Info

この質問は閉じられています。 編集または回答するには再度開いてください。

PLOT problem

1 回表示 (過去 30 日間)
Miguel
Miguel 2012 年 1 月 27 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I somehow change the default values for the axis and now is showing x from -1 to 1 and y from 0 to 2.
This is all the code I have.
x = zeros (100,1);
for i = 1:1:100;
c = cos(x);
s = sin(x);
t = tan(x);
sqr = sqrt(x);
expon = x.^2;
inverse = 1./x.^2;
end
plot (x,c)

回答 (3 件)

Andrew Newell
Andrew Newell 2012 年 1 月 27 日
I think you are trying to do something like this:
x = 1:100;
c = cos(x);
plot (x,c)

Walter Roberson
Walter Roberson 2012 年 1 月 27 日
xlim auto
ylim auto

Miguel
Miguel 2012 年 1 月 27 日
Thanks, I found my error.
  1 件のコメント
Andrew Newell
Andrew Newell 2012 年 1 月 27 日
Just one?

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by