graf1
graf1
graf1
graf1
graf1
graf1
graf1
clc
close all
mesh(peaks)
surf(peaks)
close all
load
Loading from: matlab.mat
v=0:7;
M=randi(5)
M =
5
M=randi(5,5)
M =
5 2 5 3 1
1 3 5 5 5
5 5 3 4 5
4 5 5 5 4
1 1 1 4 4
disp(7)
7
disp([5 9])
5 9
disp(0:3)
0 1 2 3
disp(v)
0 1 2 3 4 5 6 7
disp(M)
5 2 5 3 1
1 3 5 5 5
5 5 3 4 5
4 5 5 5 4
1 1 1 4 4
disp([5 9/3 pi])
5.0000 3.0000 3.1416
disp(a)
{Undefined function or variable 'a'.
}
disp('a')
a
disp('ahoj')
ahoj
disp(['ahoj' 'vsichni'])
ahojvsichni
disp(['ahoj' ' ' 'vsichni'])
ahoj vsichni
disp(['ahoj ' 'vsichni'])
ahoj vsichni
disp('a')
a
disp(7)
7
disp(['a'] )
a
disp([7])
7
disp(['a' 7] )
a
disp(['a' 70] )
aF
disp(['a' 170] )
a
disp(['a' 80] )
aP
num2str(80)
ans =
80
disp(['a=' num2str(80)] )
a=80
disp(['a=' num2str([80 5 9 7 -5])] )
a=80 5 9 7 -5
disp(['a=' num2str(v)] )
a=0 1 2 3 4 5 6 7
disp(['a=' num2str(M)] )
{Error using horzcat
CAT arguments dimensions are not consistent.
}
disp(['M=' num2str(M(1,:))] )
M=5 2 5 3 1
disp(num2str(M(2:end,:))] )
disp(num2str(M(2:end,:))] )
|
{Error: Unbalanced or unexpected parenthesis or bracket.
}
disp(num2str(M(2:end,:)) )
1 3 5 5 5
5 5 3 4 5
4 5 5 5 4
1 1 1 4 4
disp(['M=' num2str(M(1,:))] )
M=5 2 5 3 1
disp(num2str(M(2:end,:)) )
1 3 5 5 5
5 5 3 4 5
4 5 5 5 4
1 1 1 4 4
a=5;
b=7;
if a>b
c=a;
else
c=b;
end
b
b =
7
c
c =
7
prikladif
Vetsi z cisel = 7
input('Zadej a= ')
Zadej a= 45
ans =
45
a=input('Zadej a= ')
Zadej a= 23
a =
23
a=input('Zadej a= ')
Zadej a= -5
a =
-5
a=input('Zadej a= ')
Zadej a= 9/2
a =
4.5000
a=input('Zadej a= ')
Zadej a= [4 5 6]
a =
4 5 6
a=input('Zadej a= ')
Zadej a= 1:10
a =
1 2 3 4 5 6 7 8 9 10
a=input('Zadej a= ')
Zadej a= M
a =
5 2 5 3 1
1 3 5 5 5
5 5 3 4 5
4 5 5 5 4
1 1 1 4 4
a=input('Zadej a= ')
Zadej a= MM
{Error using input
Undefined function or variable 'MM'.
}
Zadej a= a=input('Zadej a= ')
{Error: The expression to the left of the equals sign is not a valid target for an assignment.
}
Zadej a= 'MM'
a =
MM
jmeno=input('Zadej jmeno= ')
Zadej jmeno= Karel
{Error using input
Undefined function or variable 'Karel'.
}
Zadej jmeno= 'Karel'
jmeno =
Karel
jmeno=input('Zadej jmeno= ', 's')
Zadej jmeno= Karel
jmeno =
Karel
prikladif1
Zadeja= 45
Zadej b= 7
Vetsi z cisel 45 a 7 je 45
diary off