How can I fill a matrix with the same sequence of numbers?
I want a matrix in which the first row contains 20 and 30. this should then also be in the next five rows.

 채택된 답변

Walter Roberson
Walter Roberson 2021년 4월 20일

0 개 추천

YourMatrix(1:6,1:2:end) = 20;
YourMatrix(1:6,2:2:end) = 30;

댓글 수: 2

Thank you an how could i fill a matrix that it looks like this?
20 20 20 20 20
30 30 30 30 30
YourMatrix(1,1:5) = 20;
YourMatrix(2,:) = 30;

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

추가 답변 (1개)

카테고리

도움말 센터File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

질문:

2021년 4월 20일

댓글:

2021년 4월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by