Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
Ihor
Ihor le 17 Jan 2023
I have a M = magic(5) matrix. How can I copy all elements, which > 4 to vector V?

Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur Data Types dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by