Finding product product of elements in a vector
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MG
el 28 de Nov. de 2015
Respondida: Image Analyst
el 28 de Nov. de 2015
I am using a vector whose length I want to vary. So supposing the vector is x = [f(1), f(2), f(3), ..... f(n)]. How do I find the product of all these entries multiplied with each other? I don't want to use cumprod because it gives me a vector output, but I only want the scalar output where the final answer is a product of all the entries.
0 comentarios
Respuesta aceptada
Image Analyst
el 28 de Nov. de 2015
Use the prod function
theProduct = prod(yourVector);
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Geometric Transformation and Image Registration en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!