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