Advertisement
Guest User

Lab 5

a guest
Apr 1st, 2015
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.72 KB | None | 0 0
  1. % function [a,b] = lab5(p,L)
  2. % if nargin<1
  3. %     p=1;
  4. %     L=1;
  5. % elseif nargin<2
  6. %     L=10;
  7. % end
  8. % a=100;
  9. % x=linspace(-pi/2,pi/2,1000);
  10. % y=L*(sqrt(cos(x*p)).*cos(a*x)+sqrt(abs(x))).*(4-x.^2).^(1/10);
  11. % a=x;
  12. % b=y;
  13. % plot(x,y);
  14.  
  15. % function [g,h] = lab5(we)
  16. % p=we.p;
  17. % L=we.L;
  18. % a=we.a;
  19. % x=linspace(-pi/2,pi/2,1000);
  20. % y=L*(sqrt(cos(x*p)).*cos(a*x)+sqrt(abs(x))).*(4-x.^2).^(1/10);
  21. % g=x;
  22. % h=y;
  23. % plot(x,y);
  24.  
  25. % function f=lab5(x)
  26. % p=1;
  27. % a=100;
  28. % f=(sqrt(cos(x*p)).*cos(a*x)+sqrt(abs(x))).*(4-x.^2).^(1/10);
  29. % end
  30. % xp=0;
  31. % a=100;
  32. % p=1;
  33. % x1=(-pi/2,pi/2,1000);
  34. % y=(sqrt(cos(x*p)).*cos(a*x)+sqrt(abs(x))).*(4-x.^2).^(1/10);
  35. % plot(x1,y)
  36. % hold on
  37. % x0=fzero(@lab5,xp);
  38. % plot(x0,0,'xm');
  39.  
  40. % ZLE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement