MATLAB


The Presentation inside:

Slide 0

Achilova Firuza (magistr TATU 202-11) MATLAB


Slide 1

Achilova Firuza (magistr TATU 202-11) Z = peaks(20); figure; h = surf(Z); view([-20,25]);


Slide 2

Achilova Firuza (magistr TATU 202-11)


Slide 3

Achilova Firuza (magistr TATU 202-11) Z = peaks(20); figure; h = surf(Z); view(3); axis on; light; lighting phong; camlight('left'); shading interp;


Slide 4

Achilova Firuza (magistr TATU 202-11)


Slide 5

Achilova Firuza (magistr TATU 202-11) [X,Y] = meshgrid(-3:0.25:3); Z = peaks(X,Y); figure; mesh(X,Y,Z); view(3); axis([-3 3 -3 3 -10 10]); grid on;


Slide 6

Achilova Firuza (magistr TATU 202-11)


Slide 7

Achilova Firuza (magistr TATU 202-11) [x,y,z,v] = flow; figure; xslice = 5; yslice = 0; zslice = 0; slice(x,y,z,v,xslice,yslice,zslice); view(3); axis on; grid on; light; lighting phong; camlight('left'); shading interp;


Slide 8

Achilova Firuza (magistr TATU 202-11)


Slide 9

Achilova Firuza (magistr TATU 202-11) [X,Y] = meshgrid(-3:0.25:3); Z = peaks(X,Y); figure; isovalues = (-3.0:0.5:3.0); contour(X,Y,Z,isovalues); view(2); axis on; grid on;


Slide 10

Achilova Firuza (magistr TATU 202-11)


Slide 11

Achilova Firuza (magistr TATU 202-11) [x,y,z,v] = flow; figure; xslice = (1:3:9); yslice = 0; zslice = 0; isovalues = (-3.0:0.25:3.0); contourslice(x,y,z,v,xslice,yslice,zslice,isovalues); view([-10 40]); axis on; grid on;


Slide 12

Achilova Firuza (magistr TATU 202-11)


Slide 13

Achilova Firuza (magistr TATU 202-11) [x,y,z,v] = flow; isovalue = -1; purple = [1.0 0.5 1.0]; figure; p = patch(isosurface(x,y,z,v,isovalue)); isonormals(x,y,z,v,p); set(p,'FaceColor',purple,'EdgeColor','none'); view([-10 40]); axis on; grid on; light; lighting phong; camlight('left');


Slide 14

Achilova Firuza (magistr TATU 202-11)


Slide 15

Achilova Firuza (magistr TATU 202-11) [x,y,z,v] = flow; isovalue = -1; colors = v; figure; [faces,verts,fcolors] = isosurface(x,y,z,v,isovalue,colors); p = patch('Vertices',verts,'Faces',faces,'FaceVertexCData',fcolors, ... 'FaceColor','interp','EdgeColor','none'); isonormals(x,y,z,v,p); isovalue2 = 0; [faces,verts,fcolors] = isosurface(x,y,z,v,isovalue2,colors); p2 = patch('Vertices',verts,'Faces',faces,'FaceVertexCData',fcolors, ... 'FaceColor','interp','EdgeColor','none'); isonormals(x,y,z,v,p2); view([-10 40]); axis on; grid on; colormap (jet(64)); light; lighting phong; camlight('left');


Slide 16

Achilova Firuza (magistr TATU 202-11)


Slide 17

Achilova Firuza (magistr TATU 202-11) load wind; xmin = min(x(:)); xmax = max(x(:)); ymin = min(y(:)); ymax = max(y(:)); zmin = min(z(:)); zmax = max(z(:)); figure; [sx sy sz] = meshgrid(xmin,ymin:10:ymax,zmin:2:zmax); h = streamtube(x,y,z,u,v,w,sx,sy,sz); set(h,'EdgeColor','none'); view([-40 50]); axis on; grid off; box on; light; lighting flat; camlight('left');


Slide 18

Achilova Firuza (magistr TATU 202-11)


Slide 19

Achilova Firuza (magistr TATU 202-11) [X,Y] = meshgrid(-8:.5:8); R = sqrt(X.^2 + Y.^2)+eps; Z = sin(R)./R; surf(X,Y,Z)


Slide 20

Achilova Firuza (magistr TATU 202-11)


Slide 21

Achilova Firuza (magistr TATU 202-11) r = pi*(-24:1:24)/24; s = pi*(-24:1:24)/24; [theta phi] = meshgrid(r,s); f = '(2 + cos(phi))*cos(theta)'; g = '(2 + cos(phi))*sin(theta)'; h = 'sin(phi)'; F = vectorize(f); G = vectorize(g); H = vectorize(h); x = eval(F); y = eval(G); z = eval(H); surf(x,y,z)


Slide 22

Achilova Firuza (magistr TATU 202-11)


Slide 23

Achilova Firuza (magistr TATU 202-11) theta = (0:1:36)*pi/18; rho = [0 1]'; x = rho*cos(theta)*sin(pi/6); y = rho*sin(theta)*sin(pi/6); z = rho*ones(size(theta))*cos(pi/6); cone = surf(x,y,z); axis square >> c1 = [1 1]'*cos(theta); set(cone,'CData',c1) >> hold on >> phi = (0:1:6)'*pi/36; X = sin(phi)*cos(theta); Y = sin(phi)*sin(theta); Z = cos(phi)*ones(size(theta)); cap = surf(X,Y,Z); >> c2 = (2:1:8)'*cos(theta)/8; set(cap,'CData',c2) >> view(-37.5,20)


Slide 24

Achilova Firuza (magistr TATU 202-11)


×

HTML:





Ссылка: