How can I delete last two colum in a matrix?

1 回表示 (過去 30 日間)
Sourasis Chattopadhyay
Sourasis Chattopadhyay 2022 年 12 月 14 日
コメント済み: Star Strider 2022 年 12 月 14 日
How can I delete last two colum in a matrix?

採用された回答

Star Strider
Star Strider 2022 年 12 月 14 日
Try something like this —
A = rand(7,5)
A = 7×5
0.5913 0.0197 0.5496 0.4826 0.8172 0.0226 0.2084 0.4920 0.3916 0.4963 0.3309 0.6599 0.3613 0.7490 0.0767 0.8878 0.2860 0.8968 0.3605 0.1475 0.8661 0.5546 0.8458 0.8396 0.9193 0.8801 0.9111 0.8651 0.2889 0.7545 0.2091 0.5319 0.4838 0.8030 0.0023
Anew = A(:,1:end-2)
Anew = 7×3
0.5913 0.0197 0.5496 0.0226 0.2084 0.4920 0.3309 0.6599 0.3613 0.8878 0.2860 0.8968 0.8661 0.5546 0.8458 0.8801 0.9111 0.8651 0.2091 0.5319 0.4838
.
  2 件のコメント
Sourasis Chattopadhyay
Sourasis Chattopadhyay 2022 年 12 月 14 日
Thank you so much for your valuable help.
Star Strider
Star Strider 2022 年 12 月 14 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by