%-- 3.11.10 16:00 --% S=sierp_koberec(5); imagesc(S) colormap([1 1 1;0 0 0]); colormap([0 0 0;1 1 1]); imwrite(S,'sierpinski.png'); X=imread('sierpinski.png'); doc fplot doc quad doc dblquad clear clc C=xlsread('cisticka.xls'); I=integ_tab(C) mean(C(:,2)) integ_fce(@sin,0,pi,50) I=integ_fce(@sin,0,pi,50) I=integ_fce(@sin,0,pi,500) I=integ_fce(@sin,0,pi,3) I=integ_fce(@sin,0,pi,20) klotoida klotoida(3) klotoida(-3) clear clc x=0:pi/10:pi; y=sin(x); dy_pribliz=deriv_tab(x,y) clc dy_pribliz=deriv_tab(x,y) cos(x) plot(x,dy_pribliz,'k.', x,cos(x),'rx'), legend ('num.derivace','presna derivace') clear clc fce=@(x) x.^2-3*x+2 d=deriv_fce(fce,-2,2,10,1e-5) x=linspace(-2,2,10) syms t;dfce=subs(diff(fce(t)),x) plot(x,d,'k.',x,dfce,'rx'), legend('num.derivace','presna derivace',4) clc r=reseni_sym(t^2-2*t) r=reseni_sym(sin(t^2)-3+t) clear clc f = @(x) x^2-x-2; x = puleni(f,1,4,1e-5) f(2) feval(f,2) ezplot('x^2-x-2') x = puleni(f,3,-1,1e-5) ezplot('x^2-x-2') f=@(x) sin(3*x)./x x=-pi:pi/50:pi; plot(x,f(x)) hold on plot(x,x*0,'g') x1=puleni(f,1,2,1e-5) x1=puleni(f,1.5,2.5,1e-5) x1=puleni(f,2.5,3.5,1e-5) clear clc doc fzero feval(f,3) fzero(f,3)