Long line formula

Long line formula - Splitting a long line formula - Mensajes

#1 Publicado: 24/9/2023 13:45:23
ioan92

ioan92

181 me gusta en 125 mensajes.

Grupo: User

Hello Everybody,

I have a small practical question:
How to split a long line (formula) on two or more lines.

I think that the subject was explained somewhere but I’m not sure about.

I know the primary solution of allocation variable names for the parts of the formula, but…

Thanks for your help.
Ioan


Do to others as you would like them to do to you! Knowledge is of no value unless you put it into practice - Chekhov
#2 Publicado: 24/9/2023 14:20:16
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Wrote

How to split a long line (formula) on two or more lines.


If your formula is piecewise composed of ± pieces, stack those pieces.

#3 Publicado: 24/9/2023 19:13:40
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Wrote

How to split a long line (formula) on two or more lines.


Composite of [+,-,/] may be reduced built-in Smath numden

A 1 usuarios les gustó este mensaje
ioan92 25/9/2023 5:46:00
#4 Publicado: 24/9/2023 20:48:46
Martin Kraska

Martin Kraska

1.361 me gusta en 2.275 mensajes.

Grupo: Moderator

Write an expression, put the cursor to where you want a line break and press Ctrl-Enter.
This works only once in a formula, not inside results and not inside brackets.

2023-09-25 01_45_02-SMath Solver - [Worksheet2_].png
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
A 2 usuarios les gustó este mensaje
Oscar Campo 24/9/2023 20:54:00, ioan92 25/9/2023 4:20:00
#5 Publicado: 27/9/2023 11:16:56
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

85 me gusta en 181 mensajes.

Grupo: User

Greetings,

You could also word-wrap your formula:


__________________________ *
SMATH_wordWrap_Math.jpg

where the 'string' uses newline characters to force on the next line (\000A\ is the special code SMath uses, just copy/paste this and it will word-wrap the string). You can copy and paste the following into your worksheet:
"a+b+\000A\0+c+d+\000A\0+e+f"

  • write your math expression as a 'string'
  • pass that value through the str2num() function; it will be evaluated





*There is an issue:

Mostrar spoiler




May this be of Good Help;
⚜ Kenny Lemens, P.E. ᵂᴵ
"No matter where you go, there you are." -Buckaroo BanzaiHotkeys: https://en.smath.com/forum/resource.ashx?a=45771&b=2
A 1 usuarios les gustó este mensaje
ioan92 27/9/2023 14:12:00
#6 Publicado: 27/9/2023 13:22:56
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Wrote

How to split a long line (formula) on two or more lines.


I have yet to see such long formula from native Engineering.
If your formula results from symbolic expansion... try maple.
For curiosity and help, show an image of that formula.
I have a 25 pages long formula ... Nothing can be done !

A 1 usuarios les gustó este mensaje
ioan92 27/9/2023 14:12:00
#7 Publicado: 27/9/2023 14:30:18
ioan92

ioan92

181 me gusta en 125 mensajes.

Grupo: User

Thank you all for your kind answers.
In fact, I looked more to something like in Mathcad:
(without limitations as mentioned by Martin - only one shot)
https://www.mathcad.com/en/blogs/mathcad-4-equation-wrapping#:~:text=Here%20are%20two%20quick%20keyboard,get%20PTC%20Mathcad%20Prime%204.0.&text=To%20toggle%20breaking%20on%20the,instantly%20moves%20down%20a%20line.
Best Regards,
Ioan
Do to others as you would like them to do to you! Knowledge is of no value unless you put it into practice - Chekhov
#8 Publicado: 27/9/2023 14:33:47
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

85 me gusta en 181 mensajes.

Grupo: User

Greetings,

I have used Mathcad's split feature as well and I can understand your plight. Keep in mind some other alternatives to present your data. For instance, you can use the a cases() function to organize your criteria/responses in a compact manner:
cases(#,#,#,#,#,#,#,#,#,#,#,#,#)

SMath_alternativesToWrap.jpg


You can also explore sum() function with a matrix in it:
sum(mat(#,#,#,#,#,#,#,#,#,9,1))

or just the system of equations feature:
sys(#,#,#,#,#,#,#,#,8,1)

Finally, you can just select your math statement and decrease the font size such that your equation will fit on the page. I have resorted to decreasing the font down to font size [2] in order for my matrix/tabulated data to fit on one page width; it served my purposes. [2023-09-28]


Also: Jean, Thank you for the good laugh! I always enjoy your litany of responses.

Mostrar spoiler



May this be of Good Help;
⚜ Kenny Lemens, P.E. ᵂᴵ
"No matter where you go, there you are." -Buckaroo BanzaiHotkeys: https://en.smath.com/forum/resource.ashx?a=45771&b=2
A 1 usuarios les gustó este mensaje
ioan92 27/9/2023 14:48:00
#9 Publicado: 27/9/2023 18:38:19
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Wrote

- even better! you can post an image of YOUR 25 pages long formula; You are correct that I am curious of this formula.


I won't show that f(x,y) symbolic expansion.
Always nice to read you Kenny ... Jean.
#10 Publicado: 27/9/2023 20:10:54
overlord

overlord

600 me gusta en 1.381 mensajes.

Grupo: Moderator

Ioan, can I ask why did you delete all your posts?
#11 Publicado: 28/9/2023 2:52:22
ioan92

ioan92

181 me gusta en 125 mensajes.

Grupo: User

Hi Overlord,
Of course you can ask...
Have a nice day,
Ioan
Do to others as you would like them to do to you! Knowledge is of no value unless you put it into practice - Chekhov
#12 Publicado: 20/12/2023 10:27:41
Basoier

Basoier

0 me gusta en 1 mensajes.

Grupo: User

Wrote

Hi Overlord,
Of course you can ask...

Have a nice day,
Ioan



I think you understand
  • Nuevos mensajes
  • Sin mensajes nuevos