Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- z1
- x = [6 3 0 1]
- x = x+10
- x(3) = 5
- x(4) = 5
- b = x^2
- c = sqrt(b)
- z2
- z = 4:2:16
- z3
- p = randi(20, 100, 1)
- sum(p)
- mean(p)
- std(p)
- hist(p)
- g= [ 10 2 1 1 1 1 5 6 6 5 3 2 1 8 9 8 9 2 2 2 2 2 4 6 7]
- sum(p)
- mean(g)
- std(g)
- hist(g)
- z4
- A = [2 3 2 3; 1 4 0 2; 5 2 2 1; 1 1 1 0]
- sum(A)
- sum(A,2)
- det(A)
- rank(A)
- inv(A)
- A’
- z5
- z6
- function [] = wykres(f,a,b)
- x = linespace(a,b,1000);
- func = eval(f);
- plot(x,y);
- end
- z7
- function [wynik]= silnia(argument)
- if argument ==0
- wynik =1;
- else
- wynik=argument*silnia(argument-1);
- end
- end
- function[wynik]=silnia(n)
- wynik=1;
- for i=1:n
- wynik=wynik*i;
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement