daily pastebin goal
70%
SHARE
TWEET

Untitled

a guest May 16th, 2018 110 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function v = solve()
  2.  
  3. f = @(x,m) exp(m*sin(x)/100);
  4.  
  5. v = ones(1,50);
  6. h = 1/100;
  7.  
  8. for i=1:50
  9.     I = (f(0,i)+f(1,i))/2;
  10.     for j=1:99
  11.         I = I + f(j*h,i);
  12.     end
  13.     I = I*h;
  14.     v(i) = I;
  15. end
  16.  
  17. end
RAW Paste Data
Top