AnonymousEng

PROBLEM:4 - #Sheet8

Dec 13th, 2013
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.32 KB | None | 0 0
  1. T = [ 5.75,5,4.2,3.4,2.7,1.05,0.7,0.5];
  2. N = [500,800,1300,1800,2250,4500,5000,5750];
  3.  
  4. T_interpol = 1:1:3 ; % we will create a vector of = [1,2,3]
  5. N_interpol = interp1(T,N,T_interpol); % this will give us the values at the vector [1,2,3]
  6.  
  7. a = polyfit(T,N,4);
  8. TT = 0:0.1:5.75;
  9. NN = polyval(a,TT);
  10.  
  11. plot(T,N,'d',TT,NN)
Advertisement
Add Comment
Please, Sign In to add comment