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일

1 개 추천

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.
Thank you for ur answer.it works

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

제품

릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by