% ZAPG: CVICENI 1

A = 5;
B = 10
disp(['A = ', num2str(A)]);

clear A;
clear all;

A = 5.123456;
A_rounded = round(A, 4);
A_rounded

C = 12 + 15 + 15

A1 = 45;
radians = deg2rad(A1);
sin(A1)

degrees = [0,30,45,60,90]
sins    = sin(deg2rad(degrees))

S = sqrt(55)
S = 55^(1/2)
S = 55^0.5
S = 55.^0.5

fprintf('S = %.7f\n', S);

% Zde je vypocet obsahu kruhu
fprintf('\n -----Vypocet obsahu kruhu----- \n');
R = input('Zadej polomer R = ');
S = pi*R^2;
fprintf('Obsah kruhu je: %.7f\n', S);
fprintf('-----------KONEC---------- \n');


K = [1 2 3 ; 4 5 6]
[1 2 3 ; 4 5 6]'
ones(2,4)
zeros(3,3)
help ones
helpwin zeros
help eig
help
K(2,3)
K(2,:)
K(:,1)


E = [1]

E = [1,2,3]  % radkovy vektor (matice 1x3)
E = [1 2 3]  % opet radkovy vektor
E = [1;2;3]  % sloupcovy vektor, oddelujeme ;
E = [1 2 3]' % ' = transpozice

F = [1 2 3; 4 5 6; 7 8 9] % definice matice

% matice, lepe citelna
F = [1 2 3; 
     4 5 6; 
     7 8 9]

F'   % transpozice matice
F*F  % matice x matice
F^2  % mocneni matice (zde to same jako F*F)
F.^2 % mocneni po prvcich

G = [7 8 9; 
     5 8 7; 
     1 2 3];

G*F
G
F
G.*F
