inputs of multi-variable functions?
Show older comments
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.
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!