Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Write a function called bell that returns the first n rows of the Bell triangle, where n is an input argument.The function must return an n-by-n array where the top left triangle contains the Bell triangle with each row of the Bell triangle positione
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
krushnasamy subramaniyan
el 15 de Jun. de 2015
Cerrada: Walter Roberson
el 15 de Jun. de 2015
n = 7;
a = zeros(n);
a(1) = 1;
for k = 1:n-1
a(k+1,1:k+1) = cumsum(a(k,[k,1:k]),2);
end
1 comentario
Respuestas (0)
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!