Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我有一个函数 a 在 Matlab 中接受 2 个参数(双),如下所示
function [x,y] = a(z)
用这个句柄调用函数时符号“~”的作用如下
[x,~,y] = a[10]
谢谢
matlab 中的“~”符号是逻辑非。所以它基本上就像忽略那个输出/输入。例如,如果我有这样一行代码:
[out1,~,out3] = 函数(vargin);
第二个输出不会保存或存储在任何地方以供以后使用。有关更多信息,请在命令窗口中键入“help ~”。