Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Mole(x_o, y_o, z_o)
- clc; format compact; syms x y real
- if nargin == 0
- x_o = 1; y_o = 0; z_o = 0.5;
- end
- f = exp(-(y-x.^2).^2); %SYMS I%
- g = matlabFunction(f); %ANTISYMS II%
- domain = [-5 5];
- % Schnitt yz-ebene
- subplot(2,2,1)
- ezplot(g(x,x_o)); %ANTISYMS II%
- % ezplot(subs(f,x,x_o)); %SYMS I%
- title('Schnitt der yz-Achse');
- % Schnitt xz-Ebene
- subplot(2,2,2)
- ezplot(g(y,y_o)); %ANTISYMS II%
- % ezplot( subs(f,y,y_o) ); %SYMS I%
- title('Schnitt der xz-Achse');
- % Isohypse zum Niveau z0
- subplot(2,2,3)
- ezplot(f==z_o, domain )
- % Alles zusammen
- subplot(2,2,4)
- ezsurf(f, domain); hold on; axis equal;
- % Schnitt in yz Ebene
- yz = ezplot3(@(p) x_o, @(p) p, @(p) g(x_o,p), domain); set(yz, 'color', 'blue') %ANTISYMS II%
- % yz = ezplot3( x_o, y, subs(f, x, x_o), domain); set(yz, 'color', 'blue') %SYMS I%
- % Schnitt in xz Ebene
- xz = ezplot3(@(p) p, @(p) y_o, @(p) g(p, y_o), domain); set(xz, 'color', 'red') %ANTISYMS II%
- % xz = ezplot3( x, y_o, subs(f, y, y_o), domain); set(xz, 'color', 'red') %SYMS I%
- % Isohypse zum Niveau z_o in in xy Ebene projeziert
- iso = ezplot( f ==z_o , domain); set(iso, 'color', 'green')
- hold off;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement