フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

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 ビュー (過去 30 日間)
krushnasamy subramaniyan
krushnasamy subramaniyan 2015 年 6 月 15 日
閉鎖済み: Walter Roberson 2015 年 6 月 15 日
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

回答 (0 件)

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by