PLOT problem

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일

0 개 추천

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일

0 개 추천

xlim auto
ylim auto
Miguel
Miguel 2012년 1월 27일

0 개 추천

Thanks, I found my error.

댓글 수: 1

Andrew Newell
Andrew Newell 2012년 1월 27일
Just one?

이 질문은 마감되었습니다.

태그

질문:

2012년 1월 27일

마감:

2021년 8월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by