Am I using fplot correct?
조회 수: 1 (최근 30일)
이전 댓글 표시
syms x
y1 = 0.35*exp(-3*x)-0.15*exp(3*x)
fplot(y1,[-10,10])
hold on
y2 = 0.2*cos(3*x)-0.5*sin(3*x)
fplot(y2,[-10,10])
legend('y1','y2')
I want to know if graph y1, y2 are equal so i want to compare them.
But when i execute this code y2 seems to be y=0
help please
댓글 수: 0
채택된 답변
Star Strider
2020년 4월 23일
The y-axis scales are significantly different, so ‘y2’ will appear to be 0 when it actually is not. Multiply ‘y2’ by a suitably large constant to make it visible:
syms x
y1 = 0.35*exp(-3*x)-0.15*exp(3*x)
fplot(y1,[-1,1]*10)
hold on
y2 = 0.2*cos(3*x)-0.5*sin(3*x)
fplot(y2*1E+11,[-1 1]*10)
hold off
legend('y1','y2\times10^{11}')
.
댓글 수: 2
추가 답변 (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!