i dont know how to write this code in one command can someone help me

2 ビュー (過去 30 日間)
mike john
mike john 2020 年 4 月 20 日
コメント済み: Rena Berman 2020 年 5 月 14 日
Perform the following using one command
1. Generate an empty matrix N
2. Initialize elements of 𝑁 (3 ∗ 4)to be zeros
3. Generate matrix 𝑂 and fill it with ones (same size of N) 4. Matrix 𝐿= 3 1 7; 2 4 −2; 2 −1 0 , find matrix 𝑋 in which all elements of 𝐿 are doubled 6 2 14 ;4 8 −4; 4 −2 0
5. Find matrix 𝑌, in which all elements of 𝑋 are less by 1
6. Find matrix 𝑍, which is the sum of elements in 𝑌 and x
  3 件のコメント
Stephen23
Stephen23 2020 年 4 月 22 日
Original question by mike john, recovered from Google Cache:
"i dont know how to write this code in one command can someone help me"
Perform the following using one command
1. Generate an empty matrix N
2. Initialize elements of ? (3 ∗ 4)to be zeros
3. Generate matrix ? and fill it with ones (same size of N) 4. Matrix ?= 3 1 7; 2 4 −2; 2 −1 0 , find matrix ? in which all elements of ? are doubled 6 2 14 ;4 8 −4; 4 −2 0
5. Find matrix ?, in which all elements of ? are less by 1
6. Find matrix ?, which is the sum of elements in ? and x
Rena Berman
Rena Berman 2020 年 5 月 14 日
(Answers Dev) Restored edit

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

採用された回答

BALAJI KARTHEEK
BALAJI KARTHEEK 2020 年 4 月 20 日
N=[];%empty matrix geneation
N=zeros(3,4)% Question 2
O=ones(3,4)% Qusetion 3
L=[3 1 7; 2 4 -2;2 -1 0];
X=L+L;% Qusetion 4
Y=X-ones(3,3);% Qusetion 5
Z=Y+X% Qusetion 6

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by