One approach:
strainNew = interp1((1:numel(strain)), strain, linspace(1, numel(strain), numel(stress)), 'linear')';
figure
plot((1:numel(strain)), strain)
hold on
plot(linspace(1, numel(strain), numel(stress)), strainNew)
hold off
It creates a 12-element vector with the same beginning and ending values as the original vector to do the interpolation.
EDIT — Added transpose operator (') to create (12 x 1) vector,, added plot. Original code otherwise unchanged.
Best Answer