Matlab function solve number pattern
이전 댓글 표시
Please some one help me in this number pattern How to write this code?
답변 (1개)
Doddy Kastanya
2021년 1월 12일
0 개 추천
The following code listing should do it (ignore the zeros in the output):
cnt=0;
for i=1:5
for j=1:i
cnt=cnt+1;
y(i,j)=cnt;
if cnt==12
break
end
end
end
y
카테고리
도움말 센터 및 File Exchange에서 MATLAB Coder에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!