write m script file or create matrix

6 ビュー (過去 30 日間)
Rashmi Amarathunga
Rashmi Amarathunga 2020 年 4 月 21 日
コメント済み: Rashmi Amarathunga 2020 年 4 月 25 日
i want write m script file for create 5x4 matrix in which first two rows are zeros and last three rows are ones.how do i create this
  1 件のコメント
Rik
Rik 2020 年 4 月 21 日
You can find guidelines for posting homework on this forum here.

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

採用された回答

Prasad Reddy
Prasad Reddy 2020 年 4 月 23 日
A=zeros(2,4) % creaes a 2X4 matrix of zeros
B=ones(3,4) % creates a 3X4 matrix of ones.
c=[A;B] % combinng thoe two matixs
% this code will produce the required matrix
  2 件のコメント
Rik
Rik 2020 年 4 月 23 日
Please don't post complete solutions to homework questions.
Rashmi Amarathunga
Rashmi Amarathunga 2020 年 4 月 25 日
Thank you for ur answer.it works

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by