Correct Data Points Incorrect Plotting
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
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
.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!