Plotting symbolic equation in matlab
조회 수: 1 (최근 30일)
이전 댓글 표시
whats wrong with this?
Here i tried to plot a sybolic equation for range x=[1,20] but it shows
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/587896/image.png)
How to fix it .and plotting the curve
댓글 수: 0
채택된 답변
Cris LaPierre
2021년 4월 18일
syms eq(x)
eq(x) = (sin(sqrt(x)+5)*exp(sqrt(x)))/sqrt(x)
fplot(eq,[0 20])
댓글 수: 2
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
vpasolve(eq,x)
% restricting range
vpasolve(eq,x,[0 10])
vpasolve(eq,x,[10 30])
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!