how to allocate a matrix less than 1 to a variable?
    4 views (last 30 days)
  
       Show older comments
    
    Jon Snow
 on 17 May 2014
  
    
    
    
    
    Edited: Azzi Abdelmalek
      
      
 on 17 May 2014
            So lets say I have matrix a = [.2 , .3 , 2 , 5 , .7 , 8]
I want to allocate all values of a <= 1 to a variable b. so b should contain .2, .3, .7
How do I do this?
0 Comments
Accepted Answer
  Azzi Abdelmalek
      
      
 on 17 May 2014
        
      Edited: Azzi Abdelmalek
      
      
 on 17 May 2014
  
      a = [.2 , .3 , 2 , 5 , .7 , 8]  
b=a(a<=1)
0 Comments
More Answers (0)
See Also
Categories
				Find more on Resizing and Reshaping Matrices 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!
