Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. close all
  2. clear all
  3.  
  4. g = @(u,v) u.^2-v.^2*sin(u).^2;
  5.  
  6. n_max = 1000;
  7. u_max = pi;
  8.  
  9. v = 2;
  10.  
  11. for n = 1:n_max
  12. u = (n-1)/(n_max-1)*u_max;
  13. x(n) = u;
  14. lhs)n) = u.^2;
  15. rhs(n) = g(u,v);
  16. end
  17.  
  18. plot(x,lhs,'b',x,rhs,'r','LineWidth',2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement