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 kilele  
#1 Posted : 11 April 2013 23:48:07(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 393

Was thanked: 132 time(s) in 113 post(s)
Hi, this is a sample made by Radovan on how to repeat calculations but using mat2sys and sys2mat from the customFunctions plugin
Another way of creating tabular data.
File Attachment(s):
repeating_calculations3.sm (10kb) downloaded 90 time(s).
kilele attached the following image(s):
repeating_calculations.png
thanks 2 users thanked kilele for this useful post.
on 12/04/2013(UTC),  on 12/04/2013(UTC)

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

Offline mkraska  
#2 Posted : 12 April 2013 00:50:05(UTC)
mkraska


Rank: Advanced Member

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

Was thanked: 1120 time(s) in 718 post(s)
Some care is required when creating tables by application of functions to lists (systems).

If more than one list or more than one occurance of a list is involved in the expression to apply, then the resulting list contains all possible combinations of elements from the individual lists and the resulting length is a power of the input list length.

There may be unexpected effects of symbolic optimization of the function definition. At least, symbolic and numeric optimization may result in different list sizes.

In the example, symbolic optimization results in storage of 2*x instead of x+x thus reducing the number of list occurences and thereby the size of the result.

Edited by user 12 April 2013 00:54:17(UTC)  | Reason: Not specified

File Attachment(s):
listen.sm (8kb) downloaded 72 time(s).
mkraska attached the following image(s):
listen.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 12/04/2013(UTC),  on 12/04/2013(UTC)
Offline kilele  
#3 Posted : 12 April 2013 01:33:40(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 393

Was thanked: 132 time(s) in 113 post(s)
Thanks! so I was quite wrong as of suggesting systems to create tables.
It is error-prone because most of the time one wants to compute several lists on the same expression.

Edited by user 12 April 2013 02:40:46(UTC)  | Reason: Not specified

thanks 1 user thanked kilele for this useful post.
on 12/04/2013(UTC)
Offline mkraska  
#4 Posted : 14 April 2013 12:51:21(UTC)
mkraska


Rank: Advanced Member

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

Was thanked: 1120 time(s) in 718 post(s)
Originally Posted by: kilele Go to Quoted Post
Thanks! so I was quite wrong as of suggesting systems to create tables.
It is error-prone because most of the time one wants to compute several lists on the same expression.


I would not go that far to say the suggestion was wrong. The procedure is safe and convenient as long as you know what you are doing. However, people just seeing such examples may wrongly generalize to expressions with multiple list occurences. It would help a lot if implicit looping with index vectors just as in Mathcad was available.
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Users browsing this topic
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.