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 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
SHWETA KHARA
el 26 de Feb. de 2018
Editada: Roger Stafford
el 26 de Feb. de 2018
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
0 comentarios
Respuesta aceptada
Roger Stafford
el 26 de Feb. de 2018
Let M be your matrix.
M = M(M>=0);
3 comentarios
Roger Stafford
el 26 de Feb. de 2018
Editada: Roger Stafford
el 26 de Feb. de 2018
M = reshape(M(M>=0),1,[]);
Más respuestas (0)
Ver también
Categorías
Más información sobre Data Type Conversion 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!