Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

how do i input this in built in funtions

1 Ansicht (letzte 30 Tage)
adriana resendez
adriana resendez am 9 Feb. 2015
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
multiply and count elements

Antworten (2)

Star Strider
Star Strider am 9 Feb. 2015
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 am 9 Feb. 2015
If m is your matrix:
theProduct = prod(m(:)); % Multiply all elements together.
theCount = numel(m); % Count the number of elements in the array.

Diese Frage ist geschlossen.

Tags

Noch keine Tags eingegeben.

Community Treasure Hunt

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

Start Hunting!

Translated by