フィルターのクリア

extracting two specific columns from matrix (Indexing)

2 ビュー (過去 30 日間)
Mark Sc
Mark Sc 2021 年 2 月 18 日
回答済み: Matt J 2021 年 2 月 18 日
Hi all,
I am trying to extract two columns (1 and 3) from a matrix, but I got an error "Error: Unbalanced or unexpected parenthesis or bracket"
anyone help!!!
clearvars
clc;
xxx=[1 2 3;2 4 5;3 4 5;1 1 1];
x=[(;,1) (:,3)]

採用された回答

Matt J
Matt J 2021 年 2 月 18 日
x=xxx(:,[1,3])

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by