1 страниц (8 вхождений)
Solving with roots - Various error messages - Сообщения
#1 Опубликовано: 15.04.2019 02:45:35
I am troubleshooting a Smath roots() function that won't solve.
I've tried it a number of ways, but all I get are new ways to express the error.
Attached is a screen-capture of the page:

test.sm (16 КиБ) скачан 29 раз(а).
In this case, the roots() function gives an error about the units, however I have confirmed that the units are fine by:
a ) removing the units in Smath to discover a new error ("no real roots" )
b ) re-typing the whole thing into MathCad and getting a solution with the right answer.
This problem came up in another document written in Smath, where it came up with a different error expression "above max allowed positive number".
I cut out and isolated this part in a separate sheet to diagnose the problem, but everything I do just creates different errors.
I'd like to ask for your thoughts on how this can be re-written to ensure Smath can solve it.
I have reviewed the wiki for ideas but nothing jumps out at me.
For those who are curious, here is the Mathcad 13 version that works:
test1.xmcd (67 КиБ) скачан 21 раз(а).
I've tried it a number of ways, but all I get are new ways to express the error.
Attached is a screen-capture of the page:
test.sm (16 КиБ) скачан 29 раз(а).
In this case, the roots() function gives an error about the units, however I have confirmed that the units are fine by:
a ) removing the units in Smath to discover a new error ("no real roots" )
b ) re-typing the whole thing into MathCad and getting a solution with the right answer.
This problem came up in another document written in Smath, where it came up with a different error expression "above max allowed positive number".
I cut out and isolated this part in a separate sheet to diagnose the problem, but everything I do just creates different errors.
I'd like to ask for your thoughts on how this can be re-written to ensure Smath can solve it.
I have reviewed the wiki for ideas but nothing jumps out at me.
For those who are curious, here is the Mathcad 13 version that works:
test1.xmcd (67 КиБ) скачан 21 раз(а).
#2 Опубликовано: 15.04.2019 04:08:54
Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
1 пользователям понравился этот пост
frapuano 15.04.2019 08:54:00
#3 Опубликовано: 15.04.2019 08:01:13
Wrotecreates different errors.
Common to get different error messages depending upon where it is in the kernel.
Good practice to never use units, unless they match [sometimes].
You are using roots, as applicable a very robust solver, solves on the canvas !
The X, Y directions canvas are unit-less ... is it ?
Integral 0000000 Transit-Units.sm (23 КиБ) скачан 38 раз(а).
Inst_Mach Number Pitot [PUBLISH].sm (31 КиБ) скачан 39 раз(а).
#4 Опубликовано: 15.04.2019 08:10:46
Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
#5 Опубликовано: 15.04.2019 13:39:37
Using units in calculations is a VERY IMPORTANT feature of Smath to me. I would not use Smath without them.
Hello NDTA,
Thank you for looking at this.
Your efforts to incorporate units into your second example are not currently working on my machine - probably a problem at my end.
I will check first that I am caught up with my software updates before saying any more. I just want to thank you as soon as possible.
Jean,
Thanks to you too.
I usually don't get much from calculations outside my field of expertise like the first sheet you posted, but your second worksheet certainly is and it looks really good!
Are you showing me these to suggest the "eval()" function? I will look more closely later.
Hello NDTA,
Thank you for looking at this.
Your efforts to incorporate units into your second example are not currently working on my machine - probably a problem at my end.
I will check first that I am caught up with my software updates before saying any more. I just want to thank you as soon as possible.
Jean,
Thanks to you too.
I usually don't get much from calculations outside my field of expertise like the first sheet you posted, but your second worksheet certainly is and it looks really good!
Are you showing me these to suggest the "eval()" function? I will look more closely later.
#6 Опубликовано: 15.04.2019 14:19:21
WroteJean,
Thanks to you too.
I usually don't get much from calculations outside my field of expertise like the first sheet you posted, but your second worksheet certainly is and it looks really good!
Are you showing me these to suggest the "eval()" function?I will look more closely later.
eval(∫(el(U,i))) ... eval(,) is the rule to accelerate the discretizer.
Sometimes is shows no effect in cases the function being discretized
is greedy [some are damned greedy !]
The other case of eval(,) is encountered when you recast a long function
typically parametric function(s) ... MyFunction(x):=eval(monsterbig)
In this case, eval(,) has the virtue of setting the kernel once for all
and naturally in the Smath executable kernel.
Another instance of eval(,) is wrt program.
Have a good day ... cheers [Jean]
#7 Опубликовано: 15.04.2019 20:15:09
Here is a Maxima-based solution with units and with no guess required.
The system is very much the original one except for the use of 'q.o instead of q.o. This allows for better result formatting (works with numeric evaluation).

test-units.sm (18 КиБ) скачан 37 раз(а).
The system is very much the original one except for the use of 'q.o instead of q.o. This allows for better result formatting (works with numeric evaluation).
test-units.sm (18 КиБ) скачан 37 раз(а).
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#8 Опубликовано: 15.04.2019 20:17:32
WroteAre you showing me these to suggest the "eval()" function?
Read carefully the observations. There are more remarkable applications
of eval(,) in other form of discretizer. This Smath document is good
piece of work of using properly Smath [Maya the Bee]
Like Maya the Bee: so much from so little for free !
Cheers ... Jean
Integrate Compendium_00 PRECIOUS Concept ArcSQRT.sm (25 КиБ) скачан 35 раз(а).
1 страниц (8 вхождений)
-
Новые сообщения
-
Нет новых сообщений