How can I process (plot, substract etc.) two vectors of different lengths?

1 view (last 30 days)
>> load('rainfallMelbourneData.mat')
_____________________________
=> (Also, see .mat attached)
____________________________________________________
>> plot(x,y)
"Error using plot
Vectors must be the same lengths."
Tried...
>> plot(x', y')
... but got same error.

Answers (1)

Andrei Bobrov
Andrei Bobrov on 2 Jun 2014
Edited: Andrei Bobrov on 2 Jun 2014
ny1 = numel(y);
ynew = interp1((1:ny1)',y,linspase(1,ny1,numel(x))');
plot(x,ynew);

Community Treasure Hunt

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

Start Hunting!