can you help me with this matlab question 2 Find the content

can you help me with this matlab question?

2. Find the content of matrix B which is the output of the following piece of code: A- 3 14 15 2 6 8 if A(5) KJ A(2,2) II A(3)> 31 B transpose (A) else B zeros (3,1) end

Solution

>> a=[3 14 15; 2 6 8];
>> if a(5) <=a(2,2) || a(3)>=1
end
>> A=[3 14 15; 2 6 8];
>> if A(5) <=A(2,2) || A(3)>=1
B=transpose(A)
else
B=zeros(3,1);
end

B =

3 2
14 6
15 8

can you help me with this matlab question? 2. Find the content of matrix B which is the output of the following piece of code: A- 3 14 15 2 6 8 if A(5) KJ A(2,2

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site