FindRoot issue - Сообщения
I was trying to solve 2 equations and getting the root using FindRoot with weird results, that when substituting with the SMath results the equations don't yield to the same results.
I know using units seem to create problems, but it sometimes works and I need to solve this somehow.
any suggestion?
Test.sm (287 КиБ) скачан 36 раз(а).
WroteI was trying to solve 2 equations and getting the root using FindRoot with weird results, that when substituting with the SMath results the equations don't yield to the same results.
I know using units seem to create problems, but it sometimes works and I need to solve this somehow.
any suggestion?
1. I don't understand what you are trying to do.
2. Here is is a working example.
3. Your document is not backward compatible
Solve FindRoots LogLikely.sm (14 КиБ) скачан 49 раз(а).
Also since you are working with units you have to pay attention at the required precision. The one shown in the function description is about the base units, m for the length and m^2 for the area.
Test - r0.sm (277 КиБ) скачан 33 раз(а).
Jean, as a structural engineer I deal a lot with units and creating a sheet without units is not professional and typically creates errors from users which we try to avoid. I read on other forums that the function works well without units (same as your sheet) so I prefer to find a way that works with units.
Davide, I am worried because this error should not occur.
I mean do I need to check every time I change my input that my output is correct?! and try to flip the variables to make it work? I tried your code in another old sheet and it did not work, I had to stick with the order a1=d first then the Area to make it work properly!!
Also, what happens if there are two positive real solutions, which one will be shown by SMath?
Thanks a lot for your help!!
WroteJean, as a structural engineer I deal a lot with units and creating a sheet without units is not professional and typically creates errors from users which we try to avoid. I read on other forums that the function works well without units (same as your sheet) so I prefer to find a way that works with units.
1. If it happens several roots, then solve(4)
2. Maple symbolic does not take units.
3. None of my Smath Process Control & Instrumentation [~ 100] carries units.
All results are in appropriate units ... [t/hr, mWc, cP ...]
4. What's the arc length unit => UnitGraphic that you can scale 1.23456789
5. Units were discussed ad nauseum Mathsoft Collaboratory.
Over 125000 exchange, not a single work sheet with units.
6. In few steps the resistance is no more Ohms ...
7. The unit system should be dead decoration, i.e: not sub-processing.
Cheers ... Jean
WroteThank Davide and Jean,
Jean, as a structural engineer I deal a lot with units and creating a sheet without units is not professional and typically creates errors from users which we try to avoid. I read on other forums that the function works well without units (same as your sheet) so I prefer to find a way that works with units.
Davide, I am worried because this error should not occur.
I mean do I need to check every time I change my input that my output is correct?! and try to flip the variables to make it work? I tried your code in another old sheet and it did not work, I had to stick with the order a1=d first then the Area to make it work properly!!
Also, what happens if there are two positive real solutions, which one will be shown by SMath?
Thanks a lot for your help!!
If using the Maxima plugin is an option for you, then the solution is straightforward.
- Units are no problem for the plugin (they are converted into symbolic variables, Maxima itself isn't unit-aware).
- Multiple solutions are returned by Solve as a row vector of solutions (with each being a list of equations). You can pick the solution by
index and apply it using Assign().
I don't know how you can know in advance which solution to use. Perhaps the reasoning on which one to select can be cast into some test for index generation.
Best regards, Martin
test1_kr.sm (290 КиБ) скачан 34 раз(а).
WroteI read on other forums that the function works well without units (same as your sheet) so I prefer to find a way that works with units.
Just remember maths are unitless.
You are solving for two monkeys that you can't augment with units.
And you have only one project in hand, what about if you are contracted
for the entire British Empire ?
Examine the attached Colebrook.
In < one page maths, it solves a monster big pile of information.
More can be added for tabulation. Little modifications will solve
for as many fluids the plant will have [commonly 100's of fluids].
At the end: one page recast will produces several inches thick of
documents in no time in unit-result visible, consultable by more
than the piping design team, thinking in terms of the $ illuminatis.
Try unitless, plot something ...
Cheers ... Jean
Inst_Colebrook Pipe Data.sm (59 КиБ) скачан 31 раз(а).
What is the 2nd place holder for ? I know: the slipping bar for the parrot
Rather from uniless maths to validate the unit-result as desired.
Whereas the standard you are using has dimension then no need to carry units
as the standard tells what the unit-result is.
In your project, I trust you [that stuff is extraterrestrial to me].
-
Новые сообщения
-
Нет новых сообщений