0% found this document useful (0 votes)
18 views6 pages

PRÁCTICA#3

Uploaded by

Bryan Jimenez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views6 pages

PRÁCTICA#3

Uploaded by

Bryan Jimenez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Práctica#3

A=[1 2 3;3,2,1;1 1 0]

A=

1 2 3
3 2 1
1 1 0

>> A(4)

ans =

>> A(end)

ans =

>> A(1)

ans =

>> A(2,1)

ans =

>> A(:,3)

ans =

3
1
0
>> A(3,:)=[]

A=

1 2 3
3 2 1

>> A(:,2)=[]

A=

1 3
3 1

>> A(:,end)

ans =

3
1

>> A=[1 2 3;3,2,1;1 1 0]

A=

1 2 3
3 2 1
1 1 0

>> B=A

B=

1 2 3
3 2 1
1 1 0

>> B(5)=3

B=

1 2 3
3 3 1
1 1 0
>> B(5)=10

B=

1 2 3
3 10 1
1 1 0

>> B(2,2)=5

B=

1 2 3
3 5 1
1 1 0

>> B(1,2)=5

B=

1 5 3
3 5 1
1 1 0

>> C=[1 2 3 4 1;3,1,2,0 2;1 1 0 1 3]

C=

1 2 3 4 1
3 1 2 0 2
1 1 0 1 3

>> D=C

D=

1 2 3 4 1
3 1 2 0 2
1 1 0 1 3
>> C(:,2)=[]

C=

1 3 4 1
3 2 0 2
1 0 1 3

>> E=ones(4)

E=

1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1

>> F=ones(5,4)

F=

1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1

>> G=zeros(6)

G=

0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
>> zeros(3,2)

ans =

0 0
0 0
0 0

>> H=eye(6)

H=

1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1

>> eye(3,3)

ans =

1 0 0
0 1 0
0 0 1

>> Z=zeros(3)

Z=

0 0 0
0 0 0
0 0 0

>> X=eye(3,2)

X=

1 0
0 1
0 0
>> y=[Z X]

y=

0 0 0 1 0
0 0 0 0 1
0 0 0 0 0

>> K=eye(2,3)

K=

1 0 0
0 1 0

>> L=ones(3)

L=

1 1 1
1 1 1
1 1 1

You might also like