What does a tilde (~) inside square brackets mean?
Ältere Kommentare anzeigen
[~, 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)?
Akzeptierte Antwort
Weitere Antworten (2)
Walter Roberson
am 18 Apr. 2013
It is equivalent to
[temp, Palette] = kmeans(reshape(B(:),M*N,3),8,'E','s','S','U');
clear temp
2 Kommentare
Delvin
am 18 Apr. 2013
Walter Roberson
am 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
am 24 Mai 2017
0 Stimmen
Whether it is supported in Matlab Version 2009 or not.
1 Kommentar
Steven Lord
am 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.
Kategorien
Mehr zu Call Python from MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!