Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.62 KB | None | 0 0
  1. % 1a.
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17. % 1b.
  18.  
  19. [r, th] = meshgrid(0:.1:2, 0:pi/20:2*pi);
  20. x1=r.*cos(th);
  21. y1=r.*sin(th);
  22. z1=r;
  23. surf(x1,y1,z1), hold on
  24.  
  25. [t, ph] = meshgrid(0:pi/20:2*pi, 0:pi/20:pi/4);
  26. x2 = sqrt(8)*sin(ph).*cos(t);
  27. y2 = sqrt(8)*sin(ph).*sin(t);
  28. z2 = sqrt(8)*cos(ph);
  29. surf (x2,y2,z2)
  30.  
  31.  
  32.  
  33.  
  34.  
  35. % 2a.
  36.  
  37. syms n;
  38. digits(4)
  39. vpa(symsum(((-1)^n)/n^2, 1, 100))
  40.  
  41.  
  42.  
  43. % 2b.
  44.  
  45. syms m;
  46. symsum(1/(m^2), 1, inf)
  47.  
  48.  
  49. % 3
  50.  
  51. syms x y, f = (y*atan(x*y))/(1+x^2*y^2)
  52. fx = diff(f,x)
  53. diff(fx,y)
  54.  
  55. % 4, I let x and y be a and b respectively.
  56.  
  57. syms a b, g = (a*2+ b*3)*exp(a + b)
  58.  
  59. ig = int(g,b,0,1-a)
  60. iga = int(ig,-1,1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement