Hi!!! I have a N-dimensional matrix. I want to convert into vector by discarding the decimal values less the 0. Please provide matlab code for this. Thank you

2 vues (au cours des 30 derniers jours)
Hi!!! I have a N-dimensional matrix. I want to convert into vector by discarding the decimal values less the 0. Please provide matlab code for this. Thank you

Réponse acceptée

Roger Stafford
Roger Stafford le 26 Fév 2018
Let M be your matrix.
M = M(M>=0);
  3 commentaires
SHWETA KHARA
SHWETA KHARA le 26 Fév 2018
Hey!! I am getting column wise.. how to get all values in 1 row
Roger Stafford
Roger Stafford le 26 Fév 2018
Modifié(e) : Roger Stafford le 26 Fév 2018
M = reshape(M(M>=0),1,[]);

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Type Conversion dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by