Effacer les filtres
Effacer les filtres

how to take all non zero elements product of matrix

3 vues (au cours des 30 derniers jours)
Jay Hanuman
Jay Hanuman le 9 Nov 2016
Modifié(e) : KSSV le 9 Nov 2016
how to do.

Réponses (1)

KSSV
KSSV le 9 Nov 2016
Modifié(e) : KSSV le 9 Nov 2016
Let A me your matrix or array.
idx = A~=0;
iwant=prod(A(idx));
idx should be an array. If not change A matrix to column using
A=A(:);
And then use the above code.

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by