%-- 29.9.10 16:13 --% lookfor funkce help funkce doc funkce f=funkce(5) funkce(5) soucet(10,5) s=soucet(10,5) clear clc s=soucet(10,5) s=soucet(10) s=soucet(10,5,6) prep=prepona(3,4) clear s=soucet(10,5); clear s=soucet(10,5); s=soucet(10,5) x=7; y=14; soucet(x,y) s=socet(10,5) s=soucet(10,5,6) pokus(1,2,3) [v1,v2,v3]=pokusven(3) [v1,v2,v3,v4,v5,v6,v7]=pokusven(3) ahoj(10) ahoj=3.5 ahoj(10) clear ahoj(10) help soucet doc soucet type sin % built-in, kód se nezobrazí type mean % kód by se měl zobrazit type sin type mean doc mean clear clc y=pi; x=sin(y); x=sin(y) fhand=@sin; y = fhand(x) fhand=@polynom1 x=7/4-0.5; y = feval(fhand,x) functions(fhand) isa(fhand,'function_handle') isa(x,'function_handle') C = {@sin, @cos, @tan}; f = C{2}; y = f(pi/3); y = f(pi/3) f = C{1}; y = f(pi/3) clear a=4; b=-2; % proměnné ve workspace primka = @(x) a*x+b; % anonymní funkce y = primka(0); y = primka(-2) a=8; y = primka(0) y = primka(-2) a=8; primka = @(x) a*x+b; % anonymní funkce y = primka(0) y = primka(-2) clear f1 = @() disp('ahoj'); f1() f = inline('x^2-2*x+3') f = inline('x^2-2*y+3') z=f(1,2) z=f(1,5) argnames(f) profile viewer f = inline('x^2-2*x+3') doc floor A=ones(5) A=ones(5,2) size(A) a=size(A) a(1) size(A,1) size(A,2) isnumeric([NaN 2 -Inf]) isnumeric('ahoj') ischar('ahoj') isreal([5 -3i 1 0]) isnan(1./[-1 0 2 5]) isprime([2 7 8 9 10 23]) isfinite([NaN 2 -Inf]) isnumeric([NaN 2 -Inf]) isnumeric('ahoj') isreal([5 -3i 1 0]) isprime([2 7 8 9 10 23]) doc elfun sin([0 pi/2; pi/4 2*pi]) real(5-3i) abs(-2+4.5i) sqrt(-2^2+4.5^2) min([0 pi/2; pi/4 2*pi]) mean([0 pi/2; pi/4 2*pi]) sort([1.3 1.7 0.9 1.4]) M=[1,2,3;-3,4,1;0,8,4] M(:,1) M(2,:) det(M) rank(M) inv(M) N=zeros(5,2) N=onse(5,2) N=ones(5,2) N=eye(5) N=magic(5) G=magic(5) sloupce=sum(G) radky=sum(G') diagonala=sum(diag(G)) diag(N) sum(ans) datestr(now) tic, M=magic(32); toc tic, M=magic(320); toc tic, M=magic(32000); toc 32000 tic, M=rand(32000); toc tic, M=rand(320); toc tic, M=rand(3200); toc tic, M=rand(9000); toc M=rand(9) M=rand(5) clc clear clc uloha uloha4 [rok,castka]=urok(15000,2.5,20000) [rok,castka]=urok(15000,3.5,20000) [rok,castka]=urok(15000,3.5,50000) [rok,castka]=urok(15000,120,50000) [rok,castka]=urok(60000,120,50000) [rok,castka]=urok(0000,120,50000) [rok,castka]=urok(0000) uloha6 doc fix fibonacci(-5) fibonacci(0) fibonacci(3.5) fibonacci(1) fibonacci(2) fibonacci(3) fibonacci(8) fibonacci(9) [prvni,druhy,treti,ctvrty,paty]=fibonacci2 doc fibonacci2 eps doc eps 2^-52 [x,y]=kv_rovnice(2,-5,-3) [x,y]=kv_rovnice(1,-2,1) [x,y]=kv_rovnice(1,0,1) f=@(x) x^2-x-2 clear f=@(x) x^2-x-2 x=puleni(f,1,4,1e-5) f=@(x)x^2-x-2 x=puleni(f,1,4,1e-5) f=@(x)x^2-x-2 x=puleni(f,1,4,1e-5) clear f=@(x)x^2-x-2 x=puleni(f,1,4,1e-5) f=@(x)x^2-x-2 x=puleni(f,1,4,1e-5) ezplot(x^2-x-2) syms x ezplot(x^2-x-2) f(2) axis[(1 4 -5 5)] axis([1 4 -5 5]) f=@(x)sin(1/x) x=puleni(f,.1,1,1e-16) f(x) ezplot('sin(1/x)') syms y ezplot(sin(1/y))