what happens if output and input parameters are given same name?
7 次查看(过去 30 天)
显示 更早的评论
Can input and output parameters of a function share same name? Example:
function a = functionName(a , b)
% code
end
What sort of conflicts would occur in such case? Please care to explain.
Thanks.
0 个评论
采纳的回答
SRI
2014-6-19
Nothing will happen only the values of the variable will be changed
inputVal = 10;
inputVal = rand(inputVal)
now the value of the 10 will be replace by 10 * 10 matrix value
0 个评论
更多回答(0 个)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!