How can I process (plot, substract etc.) two vectors of different lengths?
1 view (last 30 days)
Show older comments
>> 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.
0 Comments
Answers (1)
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);
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!