How to generate this Matrix ?
이전 댓글 표시
the matrix should be 7 by 7. start with 1 and end with 1.
the smallest number in must be 0 and biggest one is 16.
please help me solve this homework....

댓글 수: 1
John D'Errico
2022년 4월 9일
AGAIN. Stop posting this assignment. This is now the 4th time you posted it.
답변 (1개)
David Hill
2022년 4월 9일
a=16*rand(7);
a(1)=1;a(49)=1;
a(randperm(47,2)+1)=[0,16];
카테고리
도움말 센터 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!