a = 10
sin(a)
format long
sin(a)
a = [1 2 3]
b = [1; 2; 3]
c = [1 2 3]'
A = [1 2 3; 4 5 6; 7 8 9]
A = ones(5)
B = ones (5,1)
C = ones(1,5)
A = eye(4)
B = rand(6,2)
C = zeros(2,5)
a = 1:10
b = 1:0.5:10
c = linspace(1,10,3)
A = ones(3,3)
B = 2*ones(3,3)
C = A*B
D = inv(A)*B
A = ones(3,3)
b = rand(3,1)
c = rand(1,3)
A*b
A*c
A = 2*ones(3,2)
B = [1 2; 3 4; 5 6]
A*B
A.*B
A = [1 2 3; 4 5 6; 7 8 9]
B = A(2,3)
C = A(1:2, 1:3)
D = A(5,5)
A(5,5) = pi
A = 2*ones(4) 
A^2
A.^2
A = [1 2 3; 4 5 6; 7 8 9]
A(:)
A = [1 2 3; 4 5 6; 7 8 9]
a = [1 2 3]
sum(A,1)
sum(A,2)
sum(a)
x = 1:40;
y = x.^2;
plot(x,y)
x = 1:40;
y1 = x.^2;
y2 = x.^3;
plot(x,y1,x,y2)
x = 1:40;
y1 = x.^2;
y2 = x.^3;
plot(x,y1,'r--')
plot(x,y2,'b:')
x = 1:40;
y1 = x.^2;
y2 = x.^3;
plot(x,y1,'r--')
hold on
plot(x,y2,'b:')
x = 1:40;
y = x.^2;
plot(x,y,'r-')
plot(x,y,'ro')
plot(x,y,'ro-','MarkerSize',15)
x = 0:.1:1;
y = 0:.25:1;
[X,Y] = meshgrid(x,y);
Z = sin(pi*X).*sin(pi*Y);
surf(X,Y,Z)
mesh(X,Y,Z)
