Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline ioan92  
#1 Posted : 24 September 2023 19:45:23(UTC)
ioan92


Rank: Advanced Member

Groups: Registered
Joined: 23/12/2012(UTC)
Posts: 41
France, Metropolitan

Was thanked: 153 time(s) in 119 post(s)
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


Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Jean Giraud  
#2 Posted : 24 September 2023 20:20:16(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: ioan92 Go to Quoted Post
How to split a long line (formula) on two or more lines.

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

Offline Jean Giraud  
#3 Posted : 25 September 2023 01:13:40(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: ioan92 Go to Quoted Post
How to split a long line (formula) on two or more lines.

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

thanks 1 user thanked Jean Giraud for this useful post.
on 25/09/2023(UTC)
Offline mkraska  
#4 Posted : 25 September 2023 02:48:46(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,986
Germany

Was thanked: 1124 time(s) in 721 post(s)
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
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 2 users thanked mkraska for this useful post.
on 25/09/2023(UTC),  on 25/09/2023(UTC)
Offline Kenny Lemens  
#5 Posted : 27 September 2023 17:16:56(UTC)
Kenny Lemens


Rank: Advanced Member

Groups: Registered
Joined: 11/01/2018(UTC)
Posts: 133
Man
United States
Location: Wisconsin

Was thanked: 61 time(s) in 38 post(s)
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:
Code:
"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:



May this be of Good Help;
⚜ Kenny Lemens, P.E. ᵂᴵ
"No matter where you go, there you are." -Buckaroo Banzai

Hotkeys: https://en.smath.com/for...rce.ashx?a=45771&b=2
thanks 1 user thanked Kenny Lemens for this useful post.
on 27/09/2023(UTC)
Offline Jean Giraud  
#6 Posted : 27 September 2023 19:22:56(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: ioan92 Go to Quoted Post
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 !

thanks 1 user thanked Jean Giraud for this useful post.
on 27/09/2023(UTC)
Offline ioan92  
#7 Posted : 27 September 2023 20:30:18(UTC)
ioan92


Rank: Advanced Member

Groups: Registered
Joined: 23/12/2012(UTC)
Posts: 41
France, Metropolitan

Was thanked: 153 time(s) in 119 post(s)
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/...moves%20down%20a%20line.
Best Regards,
Ioan

Edited by user 27 September 2023 20:36:03(UTC)  | Reason: Not specified

Offline Kenny Lemens  
#8 Posted : 27 September 2023 20:33:47(UTC)
Kenny Lemens


Rank: Advanced Member

Groups: Registered
Joined: 11/01/2018(UTC)
Posts: 133
Man
United States
Location: Wisconsin

Was thanked: 61 time(s) in 38 post(s)
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:
Code:
cases(#,#,#,#,#,#,#,#,#,#,#,#,#)


SMath_alternativesToWrap.jpg


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


or just the system of equations feature:
Code:
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.


May this be of Good Help;
⚜ Kenny Lemens, P.E. ᵂᴵ

Edited by user 28 September 2023 23:51:35(UTC)  | Reason: Followup to the Acutal Topic at Hand; Followup to Jean Conversation in brown; additional 'trick' in

"No matter where you go, there you are." -Buckaroo Banzai

Hotkeys: https://en.smath.com/for...rce.ashx?a=45771&b=2
thanks 1 user thanked Kenny Lemens for this useful post.
on 27/09/2023(UTC)
Offline Jean Giraud  
#9 Posted : 28 September 2023 00:38:19(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: Kenny Lemens Go to Quoted Post
- 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.
Offline overlord  
#10 Posted : 28 September 2023 02:10:54(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,128
Turkey

Was thanked: 509 time(s) in 339 post(s)
Ioan, can I ask why did you delete all your posts?
Offline ioan92  
#11 Posted : 28 September 2023 08:52:22(UTC)
ioan92


Rank: Advanced Member

Groups: Registered
Joined: 23/12/2012(UTC)
Posts: 41
France, Metropolitan

Was thanked: 153 time(s) in 119 post(s)
Hi Overlord,
Of course you can ask...
Have a nice day,
Ioan
Offline Basoier  
#12 Posted : 20 December 2023 16:27:41(UTC)
Basoier

Rank: Newbie

Groups: Registered
Joined: 20/12/2023(UTC)
Posts: 1
Location: London

Originally Posted by: ioan92 Go to Quoted Post
Hi Overlord,
Of course you can ask...
Have a nice day,
Ioan


I think you understand
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.