error using plot data must be numeric, datetime, duration or an array convertible to double
조회 수: 3 (최근 30일)
이전 댓글 표시
WHY IT GIVE ME AN ERROR???
t=[0:0.1:50]
syms s
gs=1/(s^2 + 5*s + 6);
roots([1 5 6])
gjw=fourier(gs)
plot(t,gjw)
댓글 수: 0
채택된 답변
Steven Lord
2022년 2월 10일
Let's see what you're trying to plot.
t=[0:0.1:50]
syms s
gs=1/(s^2 + 5*s + 6);
roots([1 5 6]);
gjw=fourier(gs)
If you want to evaluate gjw for w equal to each of the elements in t you can do this, and then you can plot the result.
syms w
gjw_at_t = subs(gjw, w, t);
plot(t, gjw_at_t)
You might want to plot the real and imaginary parts of gjw_at_t separately.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Numbers and Precision에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!