フィルターのクリア

Info

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

how do i input this in built in funtions

1 回表示 (過去 30 日間)
adriana resendez
adriana resendez 2015 年 2 月 9 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
multiply and count elements

回答 (2 件)

Star Strider
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

Image Analyst
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.

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

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by