How can I use NaN padding instead of zero padding in a MATLAB array?
Afficher commentaires plus anciens
When I run the following example, zero padding is applied to the nonspecified indices of the array. I would like to have NaNs instead of zeros for the nonspecified indices.
X(1,1) = 7;
X(2,2) = 3;
X
This returns the following:
X =
7 0
0 3
The desired result is:
X =
7 NaN
Nan 3
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!