필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

problem in using plot function

조회 수: 2 (최근 30일)
anas qazaz
anas qazaz 2013년 5월 18일
마감: MATLAB Answer Bot 2021년 8월 20일
hi,all i want plot time axes from 1 to 5 second against theta axes from 5 to 90 but i get error t=[1:0.25:5]; >> th=[5:5:90]; >> plot(t,th) ??? Error using ==> plot Vectors must be the same lengths.
>>how i can overcome this error thanks in advance

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 5월 18일
편집: Azzi Abdelmalek 2013년 5월 18일
Type
numel(th) % result is 17
numel(t) % result is 18
the two vectors must have the same number of elements
Try this now
t=1:0.25:5;
th=5:5:numel(t)*5;
plot(t,th)

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

Community Treasure Hunt

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

Start Hunting!

Translated by