special symbolic display

special symbolic display - How can I display the variables symbolically? - Сообщения

#1 Опубликовано: 09.10.2014 02:02:27
brotjob

brotjob

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

Группа: User

After lengthy calculations I sometimes wish to show the variables that affect my numbers. I attached a small example. Besides showing the power P numerically, I would like to display P=a^2mt. How do I achieve this?
Neues Bild.png
#2 Опубликовано: 09.10.2014 02:36:02
Вячеслав Мезенцев

Вячеслав Мезенцев

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

Группа: Moderator

You can do like this
2014-10-09 12-31-25 SMath Studio Desktop - [Лист1 ].png
Russia ☭ forever, Viacheslav N. Mezentsev
#3 Опубликовано: 09.10.2014 03:03:46
brotjob

brotjob

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

Группа: User

Thank you, while this works in this short example it is not feasible in real world calculations:

  1. Engineering calculations usually start with the inputs (constraints), output is at the end. In an extended calculation that is several pages long you can't define all the calculations at the beginning and then just fill the variables.
  2. This example does not work if you have any loops or if statements in between.

Are there other means to optimize symbolically without putting figures?
volume.png
#4 Опубликовано: 09.10.2014 04:50:12
Martin Kraska

Martin Kraska

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

Группа: Moderator

Wrote


Are there other means to optimize symbolically without putting figures?



For the given problem a global switch would be handy, which could disable all assignments with the right hand side being numerically evaluable.

You can fake this behaviour by using a custom conditional definition statement. You also might need a modified display function, because for numeric results symbolic optimization just gives ugly formatting.

condef2.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#5 Опубликовано: 09.10.2014 05:44:45
brotjob

brotjob

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

Группа: User

Wrote


You can fake this behaviour by using a custom conditional definition statement.



This is a step towards the right direction. Again, however :-)

  1. Your file does not work for me. If I choose sym, I get "a not defined" in the last line P:= I am using the portable version and everything seems to be up to date.
  2. The usage of a function drastically decreases the readibility of the sheet.
  3. It is not efficient. I have to put every variable definition in the ugly function just to display one line symbolically.
  4. You probably didn't mean g_e but g :d


I do not think a global switch is the thing an average engineering user wants. The purpose is to show the dependibility. So only for a selected number of results I want the numerical result and the symbolical result just close to each other. If you define 20 variables and make long calculations you would like to know which variables affect the numerical result and which ones don't.
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений