%-- 27.10.10 15:59 --% A=generuj_matici_det(5,0,7) A=generuj_matici_det(8,0,7) det(A) A=generuj_matici_det(10,10,7) clc B=orto_baze([1 -3 5;2 1 -1; 0 1 1],1) dot(B(:,1),B(:,2)) dot(B(:,1),B(:,3)) dot(B(:,2),B(:,3)) norm(B(:,1)) B=orto_baze([1 -4;4 1;-1 0;3 0]) dot(B(:,1),B(:,2)) norm(B(:,1)) norm(B(:,2)) B=orto_baze([2 1 -2;1 1 -1;0 3 1;1 1 3],0) dot(B(:,1),B(:,2)) dot(B(:,1),B(:,3)) clear clc B=orto_baze([1 -4;4 1;-1 0;3 0]) dot(B(:,1),B(:,2)) clc grafy_polynomu(-1:.01:3,[1 -1 2],[1 -2 1 0]) doc surface clc [X,Y] = meshgrid([-2:1/4:2]); Z = X.*exp(-X.^2-Y.^2); contour3(X,Y,Z,30) surface(X,Y,Z,... % síť 'EdgeColor',[.8 .8 .8],... % šedá 'FaceColor','none') [X,Y] = meshgrid(-3:.125:3); meshc Z = peaks(X,Y); meshc(X,Y,Z); axis([-3 3 -3 3 -10 5]) doc colormap [X,Y] = meshgrid(-3:.125:3); Z = peaks(X,Y); meshc(X,Y,Z); axis([-3 3 -3 3 -10 5]) clc ezsurf('sin(sqrt(x^2+y^2))/sqrt(x^2+y^2)',[-6*pi,6*pi]) % 3D graf view(0,75) % nastavení pohledu shading interp % režim stínování ("plynulý") lightangle(-45,30) % nastavení sférické polohy světla lighting phong % Phongův osvětlovací model set(gcf,'Renderer','zbuffer') % metoda vyobrazení (zde: rychlejší vykreslení) set(findobj(gca,'type','surface'), 'FaceLighting','phong',... 'AmbientStrength',.3,'DiffuseStrength',.8, 'SpecularStrength',.9,... 'SpecularExponent',25, 'BackFaceLighting','unlit') % "zářivější" graf %mexický klobouk (sombrero) rmax=3; r=0:rmax/20:rmax; phi = -pi:pi/10:pi; [R,PHI]=meshgrid(r,phi); H=(1-R.^2).*exp(-R.*R); X = R.*cos(PHI); Y = R.*sin(PHI); P = sqrt(R.^2 +H.^2); surfc(X,Y,H,P) % kresleni koule k = 5; n = 2^k-1; [x,y,z] = sphere(n); % generuje data pro kouli c = hadamard(2^k); % textura surf(x,y,z,c); % vykresleni koule s texturou colormap([1 1 0; 0.6 0 0]) % zluta a cervena axis equal load clown clear clc load clown image(X) imagesc(X) imageext colormap('default') colormap(gray) imagesc(X) load durer image(X) colormap(map) title(caption) axis image vyrez = X(90:170, 394:480); figure, image(vyrez), colormap(map), axis image load detail figure, image(X), colormap(map), title(caption), axis image help images doc images close clear clc bod_na_spirale(.3,.1,4,21) clear bod_na_spirale(.3,.1,4,21) bod_na_spirale(.3,.1,4,160) clc bod_na_spirale(.3,.5,4,5) close all katenoid katenoid(3) membrane clc imagesc(sierp_koberec(5)) imagesc(sierp_koberec(10)) imagesc(sierp_koberec(8)) image(sierp_koberec(8))