Filter löschen
Filter löschen

array element multiplication using arrayfun or bsxfun?

2 Ansichten (letzte 30 Tage)
Chong Tao
Chong Tao am 30 Okt. 2013
Kommentiert: Chong Tao am 30 Okt. 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!

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 30 Okt. 2013
Bearbeitet: Azzi Abdelmalek am 30 Okt. 2013
A simple way
prod(1-A(:,2:9),2)

Weitere Antworten (0)

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by