Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

how do i input this in built in funtions

1 visualización (últimos 30 días)
adriana resendez
adriana resendez el 9 de Feb. de 2015
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
multiply and count elements

Respuestas (2)

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

La pregunta está cerrada.

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by