how to create a matrix from another

How would i create a matrix that is the last column and the 2nd and 4th row of matrix x?

답변 (2개)

Ameer Hamza
Ameer Hamza 2020년 9월 20일
편집: Ameer Hamza 2020년 9월 20일

0 개 추천

M = x(:, [end 2 4])
This is pretty basic stuff in MATLAB and you have other similar questions too. I ssuggest you to read about array indexing: https://www.mathworks.com/help/matlab/math/array-indexing.html.
Bruno Luong
Bruno Luong 2020년 9월 20일

0 개 추천

x([2 4], end)

이 질문은 마감되었습니다.

제품

릴리스

R2020a

태그

질문:

2020년 9월 20일

마감:

2021년 8월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by