Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


14 Pages«<1011121314>
Options
Go to last post Go to first unread
Offline omorr  
#221 Posted : 29 October 2016 21:29:16(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
That's not a bug Radovan:

=>...For the free finding solutions, IC must be either 0 or 1
[1 to releive from "divide by zero"]<= ... {previous message}
Maybe you are not up to date vs Davide ?

Jean


I was using SMath 0.98.6128 an NonlinerSolver 1.1.6099.14159

Regards,
Ra
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline omorr  
#222 Posted : 16 May 2017 19:20:27(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post
Thank you guys, these examples are very useful to fix the bugs in this plugin Good

I'm working to a new version of the code, almost totally refactored.
Looking at your examples seems there are several things to fix in my preprocessor; with some tweak, it is able to solve it.

2016-10-24 18_27_07-SMath Studio - [FindRoot.sm_].png

now I just have to find some consistant way to make it working always Crazy


Davide, any progress about this plugin and its new version?

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Davide Carpi  
#223 Posted : 16 May 2017 21:00:19(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Originally Posted by: omorr Go to Quoted Post
Davide, any progress about this plugin and its new version?

Regards,
Radovan


Hello Radovan! Good

More or less, I'm trying to make it working on the numerical functions (those containing if/else, etc...), requires some more refactoring, I'll see if I can focus on this plugin in the coming weeks...
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 16/05/2017(UTC)
Offline Jean Giraud  
#224 Posted : 17 May 2017 05:32:46(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Maybe, I don't understand much in there ?

Jean

Page1 Unknown Solve.sm (31kb) downloaded 57 time(s).
Offline omorr  
#225 Posted : 17 May 2017 16:11:59(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Maybe, I don't understand much in there ?

Jean

Page1 Unknown Solve.sm (31kb) downloaded 57 time(s).

Helo Jean,

You should define f(x) not f(u). See the file, please. Was that your question?

Page1%20Unknown%20Solve-2-corr.sm (35kb) downloaded 56 time(s).

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Jean Giraud  
#226 Posted : 19 May 2017 14:55:47(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Hello Radovan,

Example in context works fine for me. Integrator is now "scalar" 6179.
It enables the Fourier Quantum double integral, though awfully slow.
For N =31, CoC takes > 2hrs [Win 7 1.6 GHz]. ∫(x) comes from Maple.

Jean

Integral Curve Nuance.sm (27kb) downloaded 56 time(s).
Offline Alex M.  
#227 Posted : 13 April 2018 19:13:37(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Hello SMath Community, need some help with findroot() function.

I wrote a formula (biaxial bending in a column) to calculate unknown input loads based on known response. A key to practical use of the formula is to solve for unknown response based on known input loads (backwards of what formula does). When using findroot() for this purpose i run into error:
FidRoot-CustomFormulaSolution.sm (538kb) downloaded 37 time(s).
FidRoot-CustomFormulaSolution.png
What am i doing wrong?

Thanks!
Offline Davide Carpi  
#228 Posted : 13 April 2018 19:36:36(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
FindRoot, as well as other solvers of NS plugin, is not friend of eval, if/else or in general anything that requires a strict numerical evalution to be performed... that's a thing I'm working on (long overdue, I know...)
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 2 users thanked Davide Carpi for this useful post.
on 13/04/2018(UTC),  on 15/04/2018(UTC)
Offline mkraska  
#229 Posted : 12 December 2018 02:14:58(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
I don't know when these changes happened but my current observation of Findroot's behaviour seems to be different from earlier versions:

  • Just evaluate: displays result vector and executes embedded assignment

  • Assign and evaluate in the same region: Error (symbolic evaluation reveals that the expression isn't executed but just stored as if it was inside line())

  • Assign and evaluate in separate regions: displays result vector and executes embedded assignment upon display.

  • Assign wrapped in eval() and evaluate in the same region: displays result vector and executes embedded assignment (here, eval() seems to be a friend of FindRoot())


In the sheet below I tried to demonstrate how to solve a system of equations using FindRoot() as alternative to Solve(). However, I am not sure how to explain the behaviour to the students. Should we generally avoid assignment with integrated evaluation for the time being?

2018-12-12 00_06_28-SMath Studio - [Kerbformzahl Lochstab Biegung FKM.sm_].png

Kerbformzahl Lochstab Biegung FKM.sm (701kb) downloaded 33 time(s).
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 2 users thanked mkraska for this useful post.
on 12/12/2018(UTC),  on 12/12/2018(UTC)
Offline Davide Carpi  
#230 Posted : 12 December 2018 03:27:22(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Originally Posted by: mkraska Go to Quoted Post
Should we generally avoid assignment with integrated evaluation for the time being?


Yes, they should be avoided. There are several known issues while using implicit assignments, I plan to remove them when I'll have the possibility to commit a major update to this plugin.

Moreover now SMath Studio supports multiple assignments by matrices on LHS, therefore it shouldn't be a big loss.

2018-12-12 01_26_35-Window.png
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline mkraska  
#231 Posted : 12 December 2018 03:41:25(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post
Originally Posted by: mkraska Go to Quoted Post
Should we generally avoid assignment with integrated evaluation for the time being?


Yes, they should be avoided. There are several known issues while using implicit assignments, I plan to remove them when I'll have the possibility to commit a major update to this plugin.

Moreover now SMath Studio supports multiple assignments by matrices on LHS, therefore it shouldn't be a big loss.



Perhaps I wasn't clear enough. My example doesn't show any problem with embedded/implicit assignment (at least nothing obvious). What I mean is if you write an assignment with := and in the same region ask for display by = . This one seems to be a problem. Maybe, the two features are related, I don't know.

If you drop integrated/implicit assignment, perhaps would be a good idea to return a set of boolean equations which can be used with at(), just like with Solve(). Then you can easily operate with multiple solutions without having to clear inbetween.
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Jean Giraud  
#232 Posted : 10 February 2019 17:22:32(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: omorr Go to Quoted Post
Be my guest if you want to solve it

A similar problem problem kept the Mathsoft Collaboratory [mostly Jean]
busy for a while, solving for 22 variables. That was possible finally
from Given/Find with infinitely many trial/error constraints.
Given/Find Mathcad 8 Pro solves for 250
Given/Find Mathcad 11 solves for 400 but not of that nature
Given/Find MCD 11 solves for 399 in for loop as the next call
benefits of the previous estimates. That was done solving a DE
of variable coefficients as functions [something like Frobenius]

The Mathsoft 22 variables surely does not exist anymore in my old box
as it was "secret" about what is was. Maybe the Originator said 'thaks'
but not sure as commonly Done-Gone !
Yet, I don't completely understand the problem and its generation.

Cheers Radovan ... Jean


thanks 1 user thanked Jean Giraud for this useful post.
on 12/02/2019(UTC)
Offline Jean Giraud  
#233 Posted : 10 February 2019 19:29:08(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Be my guest if you want to solve it


Assuredly not a profitable guest !
I don't understand much in there.

Primer38-doomed.sm (40kb) downloaded 32 time(s).
Primer38-doomed_1.sm (45kb) downloaded 28 time(s).
thanks 1 user thanked Jean Giraud for this useful post.
on 12/02/2019(UTC)
Offline omorr  
#234 Posted : 10 February 2019 19:45:22(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Originally Posted by: Jean Giraud Go to Quoted Post
Be my guest if you want to solve it


Assuredly not a profitable guest !
I don't understand much in there.

Primer38-doomed.sm (40kb) downloaded 32 time(s).
Primer38-doomed_1.sm (45kb) downloaded 28 time(s).


Thank you Jeaan for your efforts, but I think we do not understand each other. This is not a fitting problem but finding roots of nonlinear system of equations

38doomed.PNG

The solution was found in Mathcad - this post - and some other software but never in SMath

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Razonar  
#235 Posted : 10 February 2019 23:59:18(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: omorr Go to Quoted Post


Here is the same problem solved in Mathcad

Regards,
Radovan


Hi. Can you show the guess values for x and y? And k before Find too. I get a very different k value. Remember that for numerical procedures, guess values are part of the solution, not of the problem.
Thanks in advance.

Best regards.
Alvaro.
Offline omorr  
#236 Posted : 11 February 2019 11:43:53(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Originally Posted by: Razonar Go to Quoted Post
Originally Posted by: omorr Go to Quoted Post


Here is the same problem solved in Mathcad

Regards,
Radovan


Hi. Can you show the guess values for x and y? And k before Find too. I get a very different k value. Remember that for numerical procedures, guess values are part of the solution, not of the problem.
Thanks in advance.

Best regards.
Alvaro.


Thank you Alvaro for your interest in these problems. Here is the file once more.

Primer38-doomed1.sm (32kb) downloaded 33 time(s).

This is a system of nonlinear algebraic equations. If one takes a look at the calculation here it is obvious that any gradient algorithm for solving this system will fail. Therefore, some non-gradient method might solve this (direct solving or some minimization procedure). There are some functions in the NonlinearSolvers plugin, but unfortunately, there is no update of them for a long time and many of them do not work anymore. All of these years I mentioned that we need here some well tested and robust library incorporated in SMath regarding these problems. There are no other plugins which will address these problems (AFAIK) and I am not sure that will ever be any.

Regards,
Radovan

Edited by user 11 February 2019 20:19:19(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
thanks 1 user thanked omorr for this useful post.
on 11/02/2019(UTC)
Offline Jean Giraud  
#237 Posted : 11 February 2019 22:16:54(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: omorr Go to Quoted Post
This is a system of nonlinear algebraic equations. If one takes a look at the calculation here it is obvious that any gradient algorithm for solving this system will fail. Therefore, some non-gradient method might solve this (direct solving or some minimization procedure). There are some functions in the NonlinearSolvers plugin, but unfortunately, there is no update of them for a long time and many of them do not work anymore. All of these years I mentioned that we need here some well tested and robust library incorporated in SMath regarding these problems. There are no other plugins which will address these problems (AFAIK) and I am not sure that will ever be any.

1. You seem not happy of the result by plugging [x, y] from the other software.
Did you enter enough decimals ? or that software is short of more ?
2. The Smath FindRoots is not robust in there but it can reproduce results
from your source software with more decimals that you collected.
3. Presumably the software is Matlab ?
4. In short: for a fixed Phi, you are attempting to solve pairwise [x,y]
as you scan over 'z'. Isn't true that any pairwise [x,y] will find a valid
solution or closely ? Stated otherwise: the unique non trivial pair [x,y]
is extremely sensitive to initials. That reminds me the Mathcad rootScanner
that I designed for some extremely sensitive initials. But that one tool
is only for one variable.

Cheers Radovan ... Jean

Primer38-doomed1[Solve paiWise].sm (11kb) downloaded 24 time(s).

Offline Jean Giraud  
#238 Posted : 11 February 2019 22:54:05(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Did you enterenough decimals ?

PairWise.PNG
thanks 1 user thanked Jean Giraud for this useful post.
on 12/02/2019(UTC)
Offline omorr  
#239 Posted : 11 February 2019 23:53:56(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello Jean,

The solution is from Mathcad (Given/Find)

With an increased number of decimals.

decimals.PNG

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Jean Giraud  
#240 Posted : 12 February 2019 04:45:36(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: omorr Go to Quoted Post
Hello Jean,

The solution is from Mathcad (Given/Find)
With an increased number of decimals.

That was my guess, no shame borrowing the hammer as needed.
γRK(T,x):=eval(program) ... > 4 times faster.
Cheers Radovan ... Jean

Users browsing this topic
14 Pages«<1011121314>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.