MATLAB: How to allocate a matrix less than 1 to a variable matlab code matrix easy basics allocation if for while 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? Best Answer a = [.2 , .3 , 2 , 5 , .7 , 8] b=a(a<=1) Related SolutionsMATLAB: Access different elements of matrix B = A( :, :, :, [2:5, 7] ); MATLAB: Making a new matrix with the other matrix elements. Hi.A=[8 11 9 5 10 15];B=[3*A-2; 3*A-1; 3*A];B=B(:)' Related QuestionGreater than and less thanMean of 6TH, 7TH AND 8TH numbers of every columnUsing greater than and less thanFinding value less than a threshold
Best Answer