Question: Use Matlab logical indexing and logical operations for each operation m=[-6 -10 9 7 -9 -4; -5 -8 1 -1 6 3; 5 5 -7
Use Matlab logical indexing and logical operations for each operation
m=[-6 -10 9 7 -9 -4; -5 -8 1 -1 6 3; 5 5 -7 0 0 1; 6 -5 6 4 -4 -4; 7 -5 0 3 0 -2; 6 8 3 -5 -5 -5];
1) Sum of all elements in the 1st column that are greater than zero
2) Sum of all elements in the 1st row that are less than zero
3) Same matrix as m but all elements less than zero will be replaced with zero
4) Same matrix as m but all elements equal to -1, 0 +1 will be replaced with 999
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
