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

조회 수: 1 (최근 30일)
Ihor
Ihor 2023년 1월 17일
답변: Abhinav 2023년 1월 17일
I have a M = magic(5) matrix. How can I copy all elements, which > 4 to vector V?

채택된 답변

Abhinav
Abhinav 2023년 1월 17일
M = magic(5);
V=M(M>4)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Computational Geometry에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by