Plotting symbolic equation in matlab

2 次查看(过去 30 天)
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

采纳的回答

Cris LaPierre
Cris LaPierre 2021-4-18
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 个评论
Md. Ashikur Rahman Any
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 2021-4-18
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

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by