inputs of multi-variable functions?
显示 更早的评论
I was wondering about how matlab deals with multiple inputs in a multivariable function. And I mean by that the order in which it assigns the predefined parameters to the inputs of the function in case they're given different symbols from those of the function's inputs.
For example, I've created a fun that substracts one num from another as following:
function c=sub(a,b)
c=a-b;
end
When I give it those inputs (e=3; f=2), i get -1, while doing the reverse (e=2; f=3) gives me the same ans as well! So, I can't detect a certain pattern in which matlab deals with this. And of course that doesn't happen when i give the parameter the same symbols of the function's inputs.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!