Im getting a blank graph, and alot of errors.
조회 수: 5 (최근 30일)
이전 댓글 표시
x = inline ('t>0', 't');
t1 = -2;
t2 = 6;
t = [t1, t2];
fplot (x, t)
댓글 수: 0
채택된 답변
Star Strider
2023년 3월 10일
Use an anonymous function instead of the deprecated inline function, and since the ‘x’ function actually returns a logical result, convert it to a numerical result by performing an arithmetic operation on it, here being a unary plus —
x = @(t) +t>0;
t1 = -2;
t2 = 6;
t = [t1, t2];
fplot (x, t)
xlabel('t')
ylabel('x')
... and the plot of the function magically appears!
.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

