MATLAB: How to increase elements of a vector, of different size, without changing its plot

dimentioninterpolatematchresizesynchronizetime-dependent

I have several matriz (sample) of diferente size. Each matriz contain 2 columns.The first column contains the axis (labels) indicating the range and the resolution and the second column the data. The recorded axis are different for each matriz (sample) and i need to synchronize this data.
Is it possible to do it? I tried to use interp1 but without success.
The data for 2 samples is attached.

Best Answer

OK.
Then, I would recommend converting your data into timetable, and applying synchronize and/or retime function.
The following is an example.
% Load your data
load('data.mat');
% Create timetable by assuming 1st column is time in [s]
Time = seconds(a(:,1));
A = a(:,2);
ttA = timetable(Time,A);
Time = seconds(b(:,1));
B = b(:,2);
ttB = timetable(Time,B);
% Synchronize these two data
ttAll = synchronize(ttA,ttB);
% Fillign NaN by applying interpolation, if needed
ttAll = fillmissing(ttAll,'linear');