Long line formula

Long line formula - Splitting a long line formula - Messaggi

#1 Pubblicato: 24/09/2023 13:45:23
ioan92

ioan92

181 apprezzamenti in 125 post.

Gruppo: 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 Pubblicato: 24/09/2023 14:20:16
Jean Giraud

Jean Giraud

983 apprezzamenti in 6.866 post.

Gruppo: 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 Pubblicato: 24/09/2023 19:13:40
Jean Giraud

Jean Giraud

983 apprezzamenti in 6.866 post.

Gruppo: User

Wrote

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


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

1 utenti hanno apprezzato questo post
ioan92 25/09/2023 05:46:00
#4 Pubblicato: 24/09/2023 20:48:46
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: 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
2 utenti hanno apprezzato questo post
Oscar Campo 24/09/2023 20:54:00, ioan92 25/09/2023 04:20:00
#5 Pubblicato: 27/09/2023 11:16:56
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

85 apprezzamenti in 181 post.

Gruppo: 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:

Mostra 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
1 utenti hanno apprezzato questo post
ioan92 27/09/2023 14:12:00
#6 Pubblicato: 27/09/2023 13:22:56
Jean Giraud

Jean Giraud

983 apprezzamenti in 6.866 post.

Gruppo: 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 !

1 utenti hanno apprezzato questo post
ioan92 27/09/2023 14:12:00
#7 Pubblicato: 27/09/2023 14:30:18
ioan92

ioan92

181 apprezzamenti in 125 post.

Gruppo: 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 Pubblicato: 27/09/2023 14:33:47
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

85 apprezzamenti in 181 post.

Gruppo: 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.

Mostra 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
1 utenti hanno apprezzato questo post
ioan92 27/09/2023 14:48:00
#9 Pubblicato: 27/09/2023 18:38:19
Jean Giraud

Jean Giraud

983 apprezzamenti in 6.866 post.

Gruppo: 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 Pubblicato: 27/09/2023 20:10:54
overlord

overlord

600 apprezzamenti in 1.381 post.

Gruppo: Moderator

Ioan, can I ask why did you delete all your posts?
#11 Pubblicato: 28/09/2023 02:52:22
ioan92

ioan92

181 apprezzamenti in 125 post.

Gruppo: 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 Pubblicato: 20/12/2023 10:27:41
Basoier

Basoier

0 apprezzamenti in 1 post.

Gruppo: User

Wrote

Hi Overlord,
Of course you can ask...

Have a nice day,
Ioan



I think you understand
  • Nuovi post
  • Nessun nuovo post