Rank: Member Groups: Registered
Joined: 27/02/2017(UTC) Posts: 14
|
I am not sure why SMath does not like insert - plot - 2D for f(u) Thanks Joe
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Hello Joe,
That is because you have to put "x" as a formal argument in the insert 2D plot (it is always "x" to f(x)). For insert 2D plot it does not matter if "x" is previously defined or not. XY plot works differently. It needs an undefined argument (f(x) and f(u) are the same as long as both "x" and "u" are undefined).
Regards, Radovan |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,868 Was thanked: 980 time(s) in 808 post(s)
|
Originally Posted by: JoeF I am not sure why SMath does not like insert - plot - 2D for f(u) For the "QuickPlot" the plotting canvas argument is 'x' only 'x'. You will have lot of pleasure plotting stuff in Smath. Jean Forum Plot Fun.sm (7kb) downloaded 24 time(s).
|
|
|
|
Rank: Member Groups: Registered
Joined: 27/02/2017(UTC) Posts: 14
|
Radovan / Jean: I understand now. Another question - I am reading through all the handbooks and as I read I keep adding the examples into a SMath page so as a result I will define and redefine variables ('x' and functions ( f(x) ) many times as I work through the example problems. I have run into a issue where it appears SMath gets confused if I redefine 'x' or f(x) too many times. I get error messages but if I copy and paste the particular section onto a new page by itself everything works. Again is there something I am doing wrong? Thanks Joe SMath Solving Equations.sm (227kb) downloaded 17 time(s).Edited by user 02 April 2017 19:44:57(UTC)
| Reason: Added file
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Hello Joe,
In your example roots(f(x),x)= will not work because you have x defined previously. Function roots() needs undefined variables. There is no consensus here about undefined variables in the cases similar like this one. You might use some variables that have low chances to be defined in your worksheet (something like roots(f(#x),#x)= or roots(f(_x),_x)= etc.)
Regards, Radovan
|
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,868 Was thanked: 980 time(s) in 808 post(s)
|
Originally Posted by: JoeF Another question Several answers: 1. some notes [red] in your work sheet. 2. the quick cubic solver is "polyroots". The Cardan cubic does not supports complex roots. There is a special cubic solver from Maple [attached]. 3. the classical solve [x,y,z ...] works simply. It may fail if the system is not true, for instance if the matrix is not from true numbers. Observe carefully the example so much from so little. Jean Cubic solver.sm (49kb) downloaded 22 time(s). Solve [x,y,z] Compactum.sm (93kb) downloaded 24 time(s). SMath Solving Equations.sm (227kb) downloaded 26 time(s).
|
|
|
|
Rank: Member Groups: Registered
Joined: 27/02/2017(UTC) Posts: 14
|
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,868 Was thanked: 980 time(s) in 808 post(s)
|
Hello Joe, This Smath document is interesting. At the end of page 2, the graph is in two segments. The blue segment is the plot of the explicit subsonic Mach, the red segment is the plot of the supersonic Mach. The supersonic is the implicit 'solve' roots(3). As 'x' runs on the canvas, "roots" solves for each encountered canvas pixel, thus the very fine trace ... much finer than Mathcad 11 and earlier versions that did plot on ½ pica. The other CAS that plots fine trace is "OriginLab". It does not plot function f(x), it plots from data vector but it splines "Bézier" between canvas points. Thus provides as fine trace as Smath. Cheers, Jean Inst_Mach Number Pitot.sm (192kb) downloaded 25 time(s).
|
|
|
|
Rank: Member Groups: Registered
Joined: 27/02/2017(UTC) Posts: 14
|
Thank you Jean -I will look it over. I am still working on the cubic solver file you posted. Joe
|
|
|
|
Rank: Member Groups: Registered
Joined: 27/02/2017(UTC) Posts: 14
|
Originally Posted by: omorr Hello Joe,
In your example roots(f(x),x)= will not work because you have x defined previously. Function roots() needs undefined variables. There is no consensus here about undefined variables in the cases similar like this one. You might use some variables that have low chances to be defined in your worksheet (something like roots(f(#x),#x)= or roots(f(_x),_x)= etc.)
Regards, Radovan
Radovan: Lo and behold after spending a lot of time trying to work the issue and then posting the question on this forum, on the next page of the primer was exactly what you said............ Joe
|
|
|
|
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.