필터 지우기
필터 지우기

what happens if output and input parameters are given same name?

조회 수: 5 (최근 30일)
Gautam
Gautam 2014년 6월 19일
답변: SRI 2014년 6월 19일
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.

채택된 답변

SRI
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개)

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by