Matlab function solve number pattern
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Please some one help me in this number pattern How to write this code?
Respuestas (1)
Doddy Kastanya
el 12 de En. de 2021
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
0 comentarios
Ver también
Categorías
Más información sobre Matrices and Arrays en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!