Could someone explain below part of code please ? I do not understand the first part [~,b]

1 次查看(过去 30 天)
[~,b] = min(abs(RealEL1));

采纳的回答

Matt J
Matt J 2017-10-4
编辑:Matt J 2017-10-4
These are the outputs of the min() function. b is the location of the minimum value. ~ means that the first output argument, the minimum value itself, is not to be assigned to any variable.

更多回答(1 个)

Guillaume
Guillaume 2017-10-4
The ~ ignores the first output of min as you're only interested in the index of the minimum, not its actual value.

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by