Advertisement
Gigli-0neiric

Mole - false

Jan 31st, 2016
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.77 KB | None | 0 0
  1. function Mole(x_o, y_o, z_o)
  2.  
  3. clc; format compact; syms x y real
  4. if nargin == 0
  5.     x_o = 1;
  6.     y_o = 1;
  7.     z_o = .4;
  8. end
  9. f = exp(-(y-x.^2).^2);
  10. %f = x.^2+y.^2;
  11. domain = [-3 3];
  12. % Schnitt yz-ebene
  13. subplot(2,2,1)
  14. ezplot( subs(f,x,x_o));title('Schnitt der yz-Achse');
  15.  
  16. % Schnitt xz-Ebene
  17. subplot(2,2,2)
  18. ezplot( subs(f,y,y_o) );title('Schnitt der xz-Achse');
  19.  
  20. % Isohypse zum Niveau z0
  21. subplot(2,2,3)
  22. ezplot(f==z_o, domain )
  23.  
  24. subplot(2,2,4)
  25. ezsurf(f, domain); hold on;
  26. % Schnitt in yz Ebene
  27. %yz = ezplot3(x_o,y,subs(f,x,x_o), domain);
  28. % Schnitt in xz Ebene
  29. %xz = ezplot3(x,y_o,subs(f,y,y_o), domain); set(xz, 'color', 'red')
  30. % Isohypse zum Niveau z_o in in xy Ebene projeziert
  31. iso = ezplot( f ==z_o , domain); set(iso, 'color', 'green')
  32. hold off;
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement