Write a script that uses a for loop to calculate the product of the negative numbers between -1 and -53, in increments of -4 (−1, −5, · · · , −53).
2 ビュー (過去 30 日間)
古いコメントを表示
I know how to create the number sequence its just a=(-53:4:-1) but I can't figure out how to multiply all of them together.
0 件のコメント
回答 (1 件)
Walter Roberson
2018 年 1 月 24 日
Example:
Number = 1;
for K = 1 : 10
Number = Number * (K*2+1);
end
4 件のコメント
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!