What does a tilde (~) inside square brackets mean?
显示 更早的评论
[~, 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)?
采纳的回答
更多回答(2 个)
Walter Roberson
2013-4-18
It is equivalent to
[temp, Palette] = kmeans(reshape(B(:),M*N,3),8,'E','s','S','U');
clear temp
2 个评论
Delvin
2013-4-18
Walter Roberson
2019-5-9
[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
2017-5-24
0 个投票
Whether it is supported in Matlab Version 2009 or not.
1 个评论
Steven Lord
2017-5-24
This functionality was introduced in release R2009b. So it depends what you mean by "Version 2009" -- release R2009a no, release R2009b yes.
类别
在 帮助中心 和 File Exchange 中查找有关 Call Python from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!