Ask your own question, for FREE!
Mathematics 14 Online
OpenStudy (anonymous):

How to make this matrix using Matlab A = 1 3 0 0 -3 3 3 0 1 -3 5 3 0 1 -3 7 How to make this matrix using Matlab A = 1 3 0 0 -3 3 3 0 1 -3 5 3 0 1 -3 7 @Mathematics

OpenStudy (zarkon):

Type it exactly like I have below A=[1 3 0 0 -3 3 3 0 1 -3 5 3 0 1 -3 7]

OpenStudy (anonymous):

How if using diagonal x=(1 3 5 7) to built this matrix

OpenStudy (zarkon):

diag([1 3 5 7])

OpenStudy (anonymous):

diag([1 3 5 7]) ans = 1 0 0 0 0 3 0 0 0 0 5 0 0 0 0 7 How to change 0 -> 3 and 0 -> -3

OpenStudy (zarkon):

you want to change all the 0's to 3's ?

OpenStudy (anonymous):

yes, I mean how to create matrix A using x =(1 3 5 7)

OpenStudy (zarkon):

a row matrix x=[ 1 3 5 7]

OpenStudy (zarkon):

if you want to change one entry you can by doing this A(2,1)=-3

OpenStudy (anonymous):

OK, Thanks

OpenStudy (zarkon):

for i=1:3;A(1+i,i)=-3;end

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!