How do i add a zeroes in every raws?

1 回表示 (過去 30 日間)
Ann Lee
Ann Lee 2022 年 4 月 1 日
コメント済み: Ann Lee 2022 年 4 月 1 日
hi
I started studying matlab since last week
I want to make a matrix (3x6)
0 0 1 3 5 7
0 0 4 6 8 10
0 0 9 7 5 3
I know i have to use 1:2:7 4:2:10 9:-2:3
but i don't know how to make 0 0 in this row...
Is there a easy way to create this matrix?

採用された回答

KSSV
KSSV 2022 年 4 月 1 日
A = [1:2:7; 4:2:10; 9:-2:3] ;
iwant = [zeros(3,2) A]
iwant = 3×6
0 0 1 3 5 7 0 0 4 6 8 10 0 0 9 7 5 3
  1 件のコメント
Ann Lee
Ann Lee 2022 年 4 月 1 日
thank you!!!!!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Compiler についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by