Repeating calculations

Repeating calculations - Messaggi

#1 Pubblicato: 11/04/2013 16:48:07
kilele

kilele

134 apprezzamenti in 397 post.

Gruppo: User

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.

repeating_calculations3.sm (9,69 KiB) scaricato 1619 volta(e).
2 utenti hanno apprezzato questo post
Radovan Omorjan 12/04/2013 04:17:00, Davide Carpi 12/04/2013 06:52:00
#2 Pubblicato: 11/04/2013 17:50:05
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: Moderator

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.
listen.sm (7,96 KiB) scaricato 1606 volta(e).
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
2 utenti hanno apprezzato questo post
Radovan Omorjan 12/04/2013 04:17:00, Davide Carpi 12/04/2013 06:52:00
#3 Pubblicato: 11/04/2013 18:33:40
kilele

kilele

134 apprezzamenti in 397 post.

Gruppo: User

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.
1 utenti hanno apprezzato questo post
Radovan Omorjan 12/04/2013 04:18:00
#4 Pubblicato: 14/04/2013 05:51:21
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: Moderator

Wrote

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.
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
  • Nuovi post
  • Nessun nuovo post