Displaying all elements of a matrix less than -50

4 visualizzazioni (ultimi 30 giorni)
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!

Risposta accettata

David Hill
David Hill il 21 Gen 2021
e=M(M<-50)

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by