question5 ece

mail@pastecode.io avatar
unknown
plain_text
2 years ago
396 B
1
Indexable
Never
%answer 1 starts here
a = [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,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,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];

a(2,3) = 3;
a(5,7) = -6;
a(4,9) = pi;
a(7,3) = pi/2;
%answer 1 ends here

%anwer 2 starts here
s = sparse(a);
%answer 2 ends here