Correct Data Points Incorrect Plotting

조회 수: 3 (최근 30일)
Darwin Tuazon
Darwin Tuazon 2019년 5월 15일
댓글: Adam Danz 2019년 5월 15일
I just started my course in MATLAB.
I got the correct data points but it does not reflect on my graph.
Please Help. Thank you very much
clear;
clc;
count=0;
for x=-100:0.1:100
y= x^3-x-3;
count=count+1;
y_1(count)=y;
x_1(count)=x;
end
plot(x_1,y_1,'LineWidth',2)
grid on
  댓글 수: 1
Adam Danz
Adam Danz 2019년 5월 15일
What makes you think your data are not commensurate with your plot?

댓글을 달려면 로그인하십시오.

답변 (1개)

Star Strider
Star Strider 2019년 5월 15일
The plot is correct. Note the at the upper end of the y-axis. Your y-values go from -999903 to 999897, or from about to .

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by