What does a tilde (~) inside square brackets mean?
Mostra commenti meno recenti
[~, 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)?
Risposta accettata
Più risposte (2)
Walter Roberson
il 18 Apr 2013
It is equivalent to
[temp, Palette] = kmeans(reshape(B(:),M*N,3),8,'E','s','S','U');
clear temp
2 Commenti
Delvin
il 18 Apr 2013
Walter Roberson
il 9 Mag 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
il 24 Mag 2017
0 voti
Whether it is supported in Matlab Version 2009 or not.
1 Commento
Steven Lord
il 24 Mag 2017
This functionality was introduced in release R2009b. So it depends what you mean by "Version 2009" -- release R2009a no, release R2009b yes.
Categorie
Scopri di più su Call Python from MATLAB in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!