Azzera filtri
Azzera filtri

Plotting symbolic equation in matlab

1 visualizzazione (ultimi 30 giorni)
whats wrong with this?
Here i tried to plot a sybolic equation for range x=[1,20] but it shows
How to fix it .and plotting the curve

Risposta accettata

Cris LaPierre
Cris LaPierre il 18 Apr 2021
Try creating your symbolic equation using the approach shown in the examples here.
syms eq(x)
eq(x) = (sin(sqrt(x)+5)*exp(sqrt(x)))/sqrt(x)
eq(x) = 
fplot(eq,[0 20])
  2 Commenti
Md. Ashikur Rahman Any
Md. Ashikur Rahman Any il 18 Apr 2021
If i want to get all the intersecting point of x axis for a particular range like the graph below.For instance here the intersecting ponit is in range of 1 to 400.
how to get that ?
Thanks in Advance
Cris LaPierre
Cris LaPierre il 18 Apr 2021
I think you want to use vpasolve. It does not appear to be able to return all solutions at once, so you'll have to define intervals to search in. See this example.
syms x
eq = (sin(sqrt(x)+1)*exp(sqrt(x)))/sqrt(x)==0
eq = 
vpasolve(eq,x)
ans = 
70.976883688265468138734558699208
% restricting range
vpasolve(eq,x,[0 10])
ans = 
4.5864190939097721419092042333171
vpasolve(eq,x,[10 30])
ans = 
27.912046989998261521487390466387

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by