Value must be a 1x2 vector of numeric type in which the second element is larger than the first and may be inf
조회 수: 22 (최근 30일)
이전 댓글 표시
I do not understand why the plot don't work in this interval!!!!
interval=[0 10];
x=0:0.1:10;
y=@(x) 1/x;
set(gca, 'XLim', interval, 'YLim', [y(interval(1)) y(interval(2))] );
댓글 수: 1
Jos (10584)
2019년 4월 4일
편집: Jos (10584)
2019년 4월 4일
Did you check what [y(interval(1)) y(interval(2))] returns? Do you think this is a valid Y limit?
답변 (1개)
Alex Mcaulley
2019년 4월 4일
편집: Alex Mcaulley
2019년 4월 4일
Use fplot:
interval=[0 10];
y=@(x) 1/x;
fplot(y,interval)
댓글 수: 3
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!