Добавил:
korayakov
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Мат Моделирование 2002 (ЛисовЕЦ) / лабы / labs2004 / lab1 / report_short
.txt % 5
x=[1 1.1 1.2 1.3 1.4 1.5]
y=[1 2 3 4 5 6]
x=x'
y=y'
x+y
x-y
3*x+5*y
x.*y
x=x'
x*y
y=1:6
x=1:0.1:1.4
pr1
pr1
qvadrat(2)
% 6
a=ones(2,3)
b=zeros(3,2)
% 7
who
whos
% 8
a(1,:)=x(1:3)
a(2,:)=x(3:5)
b(:,1)=y(1:3)
b(:,2)=y(4:6)
c=b
l=b(:,2)>4
c=c(l,:)
d = a(:,1:2)
d = a(:,[1 3])
% 9
x(1)=-6
x(8)=abs(x(1))
x=x'
% 10
e=[a; 7 8 9 ]
e=e'
rank(e)
e(3,3)=10
rank(e)
det(e)
inv(e)
eig(e)
[V,D]=eig(e)
% 11
for i=1:3,for j=1:3,e(i,j)=sin(i*j),pause,end,end
for i=1:3,for j=1:3,e(i,j)=sin(i*j);,end,end
e
rank(e)
det(e)
inv(e)
eig(e)
[V,D]=eig(e)
for i=1:3
for j=1:3
e(i,j)=sin(i*j);
end
end
e
pr_02
% 12
clear
clc
who
whos
% 13
for i=1:3
for j=1:4
if i==j,
a(i,j)=2;
elseif abs(i-j)==1,
a(i,j)=-1;
else
a(i,j)=0;
end
end
end
a
x=[1 1.1 1.2 1.3 1.4 1.5]
y=[1 2 3 4 5 6]
x=x'
y=y'
x+y
x-y
3*x+5*y
x.*y
x=x'
x*y
y=1:6
x=1:0.1:1.4
pr1
pr1
qvadrat(2)
% 6
a=ones(2,3)
b=zeros(3,2)
% 7
who
whos
% 8
a(1,:)=x(1:3)
a(2,:)=x(3:5)
b(:,1)=y(1:3)
b(:,2)=y(4:6)
c=b
l=b(:,2)>4
c=c(l,:)
d = a(:,1:2)
d = a(:,[1 3])
% 9
x(1)=-6
x(8)=abs(x(1))
x=x'
% 10
e=[a; 7 8 9 ]
e=e'
rank(e)
e(3,3)=10
rank(e)
det(e)
inv(e)
eig(e)
[V,D]=eig(e)
% 11
for i=1:3,for j=1:3,e(i,j)=sin(i*j),pause,end,end
for i=1:3,for j=1:3,e(i,j)=sin(i*j);,end,end
e
rank(e)
det(e)
inv(e)
eig(e)
[V,D]=eig(e)
for i=1:3
for j=1:3
e(i,j)=sin(i*j);
end
end
e
pr_02
% 12
clear
clc
who
whos
% 13
for i=1:3
for j=1:4
if i==j,
a(i,j)=2;
elseif abs(i-j)==1,
a(i,j)=-1;
else
a(i,j)=0;
end
end
end
a