MATLAB: How to resample data from 1 sample per second to 50 samples per second

array

I am collecting data from an Avionics device which provides 1 sample per second sampling rate. I have the ability to get the .csv file that is generated by this equipment and read it into my MATLAB environment with the Textscan command which I set up as a variable d1. From there, I am able to create my Array and separate out my time vector and data vector to define my timeseries as follows:
A_1=[d1{:}]; %Vector Array of d1 data;
t1 = A_1(:,1); % Time Vector at 1 sample/sec;
data1 = A_1(:,2:end); % Measured data in Array;
ts1 = timeseries(data1, t1); %Timeseries variable for t1;
Can anyone please provide some details or guidance on what steps to take or define to go from a 1-Sample/sec sampling rate to 50-Samples/sec sampling rate through the use of the resample command which will allow me to view the effects of my data at the higher sampling rate? Thank you.

Best Answer

You can use interp1 to resample the data by interpolation. For example, try
t1_resampled = interp1(linspace(0, 1, length(t1)), t1, linspace(0, 1, 50*length(t1)));
data1_resampled = interp1(linspace(0, 1, length(data1)), data1, linspace(0, 1, 50*length(data1)))