Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

problem in using plot function

4 Ansichten (letzte 30 Tage)
anas qazaz
anas qazaz am 18 Mai 2013
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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

Antworten (1)

Azzi Abdelmalek
Azzi Abdelmalek am 18 Mai 2013
Bearbeitet: Azzi Abdelmalek am 18 Mai 2013
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)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by