Removing low values from a matrix
41 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi
I have a small problem, I have a 134x10 matrix, which has some noise elemetns. I would like to remove them.
As in the picture below, all elements less than 0.0108 are noise. I am attaching the file
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/511202/image.jpeg)
I tried this code
ModeShapes(ModeShapes < 0.01) = [];
but this doesnot works as I want.
Does anybody knows how it can be done
Risposte (1)
KALYAN ACHARJYA
il 6 Feb 2021
Modificato: KALYAN ACHARJYA
il 6 Feb 2021
Remove menas, you have to replace by other certain values, so that it can be easily distinguishable.
mat(mat<0.0108)=0
or
mat(mat<0.0108)=NaN
More: You cann't completely delete the certain matrix elements (replace option), but you can either delete the certain rows or column easily complete.
4 Commenti
KALYAN ACHARJYA
il 6 Feb 2021
Modificato: KALYAN ACHARJYA
il 7 Feb 2021
Yes, because there are atleast one value (which is less than 0.0108) in each row of ModeShapes matrix, hence it shows the all rows deletion.
Rethink on "yes, I want to delete those rows which are less than 0.01"?
Vedere anche
Categorie
Scopri di più su Specialized Messages in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!