Calculating difference of unequal vectors

I have a four vectors as shown below where Exp_temp and Exp_time are the experimental values and Num_temp and Num_time are the numerical results. I want to calculate the difference between experimental and numerical values.The length of the vectors and sample interval are unequal. How to calculate the difference.
Num_temp = [5; 6; 8; 5; 4; 3; 7; 3]; Num_time = [1; 2; 3; 4; 5; 6; 7; 8];
Exp_temp = [2; 3; 1; 2; 4; 7]; Exp_time = [1; 2; 4; 6; 7; 8];

 Accepted Answer

More Answers (2)

I want to calculate difference with respect to time. The total time for both numerical and experiment is same.

1 Comment

Num_temp = [5; 6; 8; 5; 4; 3; 7; 3]; Num_time = [1; 2; 3; 4; 5; 6; 7; 8];
Exp_temp = [2; 3; 1; 2; 4; 7; 0; 0]; Exp_time = [1; 2; 0; 4; 0; 6; 7; 8];

Sign in to comment.

Thank you. I am able to interpolate. yi = interp1(Num_time,Num_temp,Exp_time);

Categories

Find more on Debugging and Improving Code in Help Center and File Exchange

Asked:

on 14 Nov 2014

Answered:

on 14 Nov 2014

Community Treasure Hunt

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

Start Hunting!