Repeating calculations

Repeating calculations - Сообщения

#1 Опубликовано: 11.04.2013 16:48:07
kilele

kilele

133 сообщений из 397 понравились пользователям.

Группа: 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 КиБ) скачан 109 раз(а).
2 пользователям понравился этот пост
Radovan Omorjan 12.04.2013 04:17:00, Davide Carpi 12.04.2013 06:52:00
#2 Опубликовано: 11.04.2013 17:50:05
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: 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 КиБ) скачан 90 раз(а).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
2 пользователям понравился этот пост
Radovan Omorjan 12.04.2013 04:17:00, Davide Carpi 12.04.2013 06:52:00
#3 Опубликовано: 11.04.2013 18:33:40
kilele

kilele

133 сообщений из 397 понравились пользователям.

Группа: 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 пользователям понравился этот пост
Radovan Omorjan 12.04.2013 04:18:00
#4 Опубликовано: 14.04.2013 05:51:21
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: 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.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений