matrix change affect other matrix
    6 views (last 30 days)
  
       Show older comments
    
    Anusha
 on 28 Jan 2014
  
    
    
    
    
    Answered: Azzi Abdelmalek
      
      
 on 28 Jan 2014
            a=
5 6 7 3 8 3 4
if 7 and 3 are interchanged
matrix B=
 4 5 6 6
 3 8 4 8
 7 3 5 3
will also changed the value automatically
like my output will be
 4 5 6 6
 7 8 4 8
 3 7 5 7
0 Comments
Accepted Answer
  Azzi Abdelmalek
      
      
 on 28 Jan 2014
        B=[ 4 5 6 6
  3 8 4 8
  7 3 5 3]
idx1=B==7;
idx2=B==3;
B(idx1)=3;
B(idx2)=7;
0 Comments
More Answers (0)
See Also
Categories
				Find more on Matrix Indexing in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
