Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %%
- A=[1 5 9; 2 6 10; 3 7 11; 4 8 12];
- B=[4 5 6; 3 2 1; 1 1 1];
- c=[1;3;5;7;];
- d=[0 2 4];
- A(2,3)
- B(2,3)
- c(2)
- d(3)
- [m,n]=size(A)
- x=length(d)
- A(:,1)
- A(:,2)
- A(:,3)
- A(:,2)=c
- clear B
- b1=[4;3;1]
- b2=[5;2;1]
- b3=[6;1;1]
- B=[b1 b2 b3]
- %%
- A=[1 5 9; 2 6 10; 3 7 11; 4 8 12];
- B=[4 5 6; 3 2 1; 1 1 1];
- c=[1;3;5;7;];
- d=[0 2 4];
- A(:,3)=c;
- B(2,:)=d;
- %%
- A=[1 5 9; 2 6 10; 3 7 11; 4 8 12];
- e=A(1,:);
- A(1,:)=A(4,:);
- A(4,:)=e;
- f=A(:,2);
- A(:,2)=A(:,3);
- A(:,3)=f
- %%
- A=[1 5 9;2 6 10;3 7 11;4 8 12;];
- B=[4 5 6;3 2 1;1 1 1];
- x=[1;1;1];
- a=[-1 0 1];
- A*x
- B*x
- A*B
- a*x
- x*a
- a*B
- %%
- A=[1 5 9;2 6 10;3 7 11;4 8 12;];
- x=[1;1;1];
- y=zeros(4,1);
- for i=1:4
- s=0;
- for j=1:3
- s=s+A(i,j)*x(j);
- end
- y(i)=s;
- end
- y
- %%
- A=1 0 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement