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

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Paecific  
#1 Posted : 25 October 2021 19:34:04(UTC)
Paecific

Rank: Newbie

Groups: Registered
Joined: 25/10/2021(UTC)
Posts: 5
United States
Location: California

Trying to plot a variety of functions and nothing shows up in the plots.
I have 23 yrs of MathCad experience, but cannot figure out what Smath is looking for to plot three very simple function (See attached file).
Additionally, I am not sure why an equation needs vectorized to output the answers in the normal distribution equation.

Equation 1 - Normal distribution does not solve as a function until it is vectorized. Why?
Equation 2 - f(x):x^3+2*x*sin(0.25) solves without vectorization but will not plot. Why?
Equation 3 - f(x):vectorize(1/{σ*sqrt(2*π)}*e^{-1/2*({x-μ}/σ)^2}) solves with vectorization but does not plot (2D or X-Y plot method). Why?


Smath - 2D Plots.sm (16kb) downloaded 13 time(s).

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Paecific  
#2 Posted : 25 October 2021 19:54:36(UTC)
Paecific

Rank: Newbie

Groups: Registered
Joined: 25/10/2021(UTC)
Posts: 5
United States
Location: California

Equation 2 also needs vectorized to get the correct results.
You don't have to do this in MathCad, why here?
Offline PompelmoTell  
#3 Posted : 25 October 2021 20:35:07(UTC)
PompelmoTell


Rank: Advanced Member

Groups: Registered
Joined: 23/12/2011(UTC)
Posts: 318
Man
Italy
Location: italy

Was thanked: 109 time(s) in 93 post(s)
You have defined a vector of values ​​for x. If you use the X-YPLOT plugin you need to change the variable. If instead you use SM native 2D graph then it already works as you expect
Solver_ZlzWlOSv41.png
sergio
Offline Paecific  
#4 Posted : 25 October 2021 20:42:14(UTC)
Paecific

Rank: Newbie

Groups: Registered
Joined: 25/10/2021(UTC)
Posts: 5
United States
Location: California

First Solution Found
This allowed me to plot Normal Distribution Function.
augment(x,f(x))
Offline Paecific  
#5 Posted : 25 October 2021 21:13:13(UTC)
Paecific

Rank: Newbie

Groups: Registered
Joined: 25/10/2021(UTC)
Posts: 5
United States
Location: California

Solved for now. On with the learning experience.
Thanks....
Offline Renzorex  
#6 Posted : 25 October 2021 21:13:44(UTC)
Renzorex


Rank: Member

Groups: Registered
Joined: 09/11/2020(UTC)
Posts: 17
Peru
Location: Cusco

Was thanked: 4 time(s) in 2 post(s)
Hi, if you need a quick plot I recommend you use 2D standard plot you can plot functions f(x) directly , if you need a more configurable plot use XY plot but you need to put your data in a special format. PlotXY.png Smath - 2D Plots.sm (20kb) downloaded 4 time(s).
Offline overlord  
#7 Posted : 25 October 2021 21:29:09(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,124
Turkey

Was thanked: 506 time(s) in 337 post(s)
You don't need to use range() and augment() if you want to plot sections.
You can limit it with if-else() or cases().

Regards

plot.png

Edited by user 25 October 2021 21:31:01(UTC)  | Reason: Not specified

Offline Jean Giraud  
#8 Posted : 25 October 2021 21:43:24(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: Paecific Go to Quoted Post
Trying to plot a variety of functions and nothing shows up in the plots.
I have 23 yrs of MathCad experience, but cannot figure out what Smath is looking for to plot three very simple function (See attached file).
Additionally, I am not sure why an equation needs vectorized to output the answers in the normal distribution equation.

1. Show the two other ones on same document for doctoring.
2. Your sigma makes no sense !
3. BTW, in Samples you should find my Stat Treasury [10 WS]
Hard to find such immense Compendium.
4. If you can't download, please let me know
Welcome ... Jean.

Smath - 2D Plots.sm (18kb) downloaded 12 time(s).
Offline Jean Giraud  
#9 Posted : 25 October 2021 21:50:14(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)
... besides the pure statistical application,
you can use to fit data sets [Fréchet US Rainfall ...]
Offline Jean Giraud  
#10 Posted : 25 October 2021 21:52:41(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
... besides the pure statistical application,
you can use to fit data sets [Fréchet US Rainfall ...]

There is about 24 built-in PDF in Smath ... f(x) menu
as well as CDF, ICDF
Offline Jean Giraud  
#11 Posted : 26 October 2021 13:05:13(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: Paecific Go to Quoted Post
Equation 1 - Normal distribution does not solve as a function until it is vectorized. Why?

1. Discretize the range you want and plot ... No vectorize.
2. Plot scalar directly.

Normal.PNG
Offline Jean Giraud  
#12 Posted : 26 October 2021 13:29:00(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)
Paecific.sm (10kb) downloaded 7 time(s).
Offline Jean Giraud  
#13 Posted : 26 October 2021 14:20:56(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)
... in most applications inc(Low,High,step,f(#)) is preferred

Paecific.sm (15kb) downloaded 7 time(s).
Offline Jean Giraud  
#14 Posted : 26 October 2021 15:50:27(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)
Scalar plots have limited use, mostly confirm the project.
Discrete plot can be used for subsequent application/export.
1. Collapsed the algo at top utilities.
2. Use it infinitely in-situ use [range each f(x) at will].

AlgoStyle.PNG
Offline overlord  
#15 Posted : 26 October 2021 17:29:10(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,124
Turkey

Was thanked: 506 time(s) in 337 post(s)
Try this file.

Regards

Smath - 2D Plots_r1.sm (18kb) downloaded 22 time(s).

Users browsing this topic
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.