array element multiplication using arrayfun or bsxfun?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Chong Tao
el 30 de Oct. de 2013
Comentada: Chong Tao
el 30 de Oct. de 2013
how can I use arrayfun to do multiplication of array element by column, say I have a 300X10 array, I want to do simple math of the elements from column 2 to 9, to get: (1-A(:,2)).*(1-A(:,3))... .*(1-A(:,9))? thanks!
0 comentarios
Respuesta aceptada
Azzi Abdelmalek
el 30 de Oct. de 2013
Editada: Azzi Abdelmalek
el 30 de Oct. de 2013
A simple way
prod(1-A(:,2:9),2)
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrix Indexing en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!