Reusing variable results in wrong result

Reusing variable results in wrong result - Сообщения

#1 Опубликовано: 16.03.2014 13:21:17
midas

midas

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

Группа: User

Hi,

Not sure if it is a bug or a usage error on my side, please kindly move if not posted correctly.
I am using a formula to compute a breaking tension and a safety factor. So far so good, now as a penultimate step I want to go through multiple materials.
As a last step I, redefine the computation method for the tension and go again through all materials. However the results are the SAME as before. I checked manually and they should be different. When I use a vector for all materials, the correct values are shown.

attached are the two minimal examples

Edit: win7x64 and SMath 0.97.5154
minimal_novect.sm (15 КиБ) скачан 35 раз(а).
#2 Опубликовано: 16.03.2014 13:41:57
Martin Kraska

Martin Kraska

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

Группа: Moderator

If you let the mouse hover over the definition of S, then you see that there is no reference to [MATH]σ_v[/MATH] any more, because it has been replaced by the already known numerical value.

What you can do is
  • either shift the definition of [MATH]S[/MATH] above the definition [MATH]σ_v[/MATH] or
  • switch the definition of [MATH]S[/MATH] to numeric optimization in the context menu.


You might wonder why the formula is stored as it is if you request numeric evaluation and all known values are stored if you request symbolic optimization. The reason is, that numeric optimization fails due to [MATH]σ_b[/MATH] not defined and no optimization is done at all -> the formula is stored as it was input.

BTW, you might consider replacing names like [MATH]σ_v[/MATH] by [MATH]σ,v[/MATH] using literal subscipts. You get them by typing a dot.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#3 Опубликовано: 20.03.2014 19:29:47
midas

midas

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

Группа: User

thank you, I will try your suggestions.
on a side note, it seems the "thank" function is not working.
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений