Displaying all elements of a matrix less than -50

4 views (last 30 days)
In my homework I have to assign a column vectore e to all the elements of matrix M that are less than -50, then display them like so
-60
-83
-78
-51
All my attempts so far have only yielded a logical array of 1s and 0s, and to be honest I have no clue where to go. Also it probably goes without saying that I am very new to MatLab. Thanks in advance!

Accepted Answer

David Hill
David Hill on 21 Jan 2021
e=M(M<-50)

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!