Info
此问题已关闭。 请重新打开它进行编辑或回答。
how do i input this in built in funtions
1 次查看(过去 30 天)
显示 更早的评论
回答(2 个)
Star Strider
2015-2-9
I’m not certain what you want, so I’ll venture this:
x=[3,7,2,9,4];
product_x = prod(x)
elements_x = length(x)
elements_x = numel(x)
produces:
product_x =
1512
elements_x =
5
elements_x =
5
0 个评论
Image Analyst
2015-2-9
If m is your matrix:
theProduct = prod(m(:)); % Multiply all elements together.
theCount = numel(m); % Count the number of elements in the array.
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!