What does a tilde (~) inside square brackets mean?
Afficher commentaires plus anciens
[~, Palette] = kmeans(reshape(B(:),M*N,3),8,'E','s','S','U');
Specifically, what does the ~ inside the square brackets represent (e.g. a matrix with multiple LHS assignment)?
Réponse acceptée
Plus de réponses (2)
Walter Roberson
le 18 Avr 2013
It is equivalent to
[temp, Palette] = kmeans(reshape(B(:),M*N,3),8,'E','s','S','U');
clear temp
2 commentaires
Delvin
le 18 Avr 2013
Walter Roberson
le 9 Mai 2019
[ThIsVArIAblEiZnOTuzED, Palette] = kmeans(reshape(B(:),M*N,3),8,'E','s','S','U');
clear ThIsVArIAblEiZnOTuzED
and the [] mean that multiple outputs are being returned from the function. It is not an array.
Ankur Bhardwaj
le 24 Mai 2017
0 votes
Whether it is supported in Matlab Version 2009 or not.
1 commentaire
Steven Lord
le 24 Mai 2017
This functionality was introduced in release R2009b. So it depends what you mean by "Version 2009" -- release R2009a no, release R2009b yes.
Catégories
En savoir plus sur Call Python from MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!