Why does the MATLAB plot show up with no function on it?
조회 수: 4 (최근 30일)
이전 댓글 표시
figure()
x = linspace(0,1000);
y1 = (sqrt(2)*sqrt(x.^4 + 9)) ./ (2*x.^2);
plot(x,y1)
xlim([1,2])
ylim([0.8,2])
댓글 수: 0
답변 (1개)
Jon
2020년 11월 10일
편집: Jon
2020년 11월 10일
Your plot limits are outside of the range of the data.
Also you don't have enough (or any data points) in the range of x that you are plotting.
If you truly want to plot for x between 1 and 2 try
figure()
x = linspace(1,2); % just range of interest
y1 = (sqrt(2)*sqrt(x.^4 + 9)) ./ (2*x.^2);
plot(x,y1)
xlim([1,2])
ylim([0.8,2])
댓글 수: 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!