How can I copy all elements, which > 4 to vector V?

1 Ansicht (letzte 30 Tage)
Ihor
Ihor am 17 Jan. 2023
Beantwortet: Abhinav am 17 Jan. 2023
I have a M = magic(5) matrix. How can I copy all elements, which > 4 to vector V?

Akzeptierte Antwort

Abhinav
Abhinav am 17 Jan. 2023
M = magic(5);
V=M(M>4)

Weitere Antworten (0)

Kategorien

Mehr zu Interpolation finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by