Making elements in an array zero
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello everyone,
This might be a very basic question or not im not sure.
I have an array say
[1 5 7 9 3 7 0 0 0
1 5 7 9 3 7 0 0 0
1 5 7 9 3 7 0 0 0
1 5 7 9 3 7 0 0 0
1 5 7 9 3 7 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0]
I have to empty these zeros from the table maintaing the array structure as the cell locations are assigned to some other variables.
Even though i make them blank in the input file, when it is read using uiget file this appears as nan and that i converted to zero assuming that the interp1 will work out .
But unfortunately it accounts for these zeros and throws unique grid points error.
So i plan to make these zero's blank or rather the nan elements to blank.
Can anyone help me in this?
I cannot disturb the row column used in the array.
Hope to get a solution.
Thank you
2 commentaires
madhan ravi
le 30 Jan 2019
So you want to basically replace zeros with nan or remove the entire row/column filled with zeros?
Réponse acceptée
Voir également
Catégories
En savoir plus sur Logical 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!