0
다음과 같은 작동 기능 (a)을 가지고 있습니다. 이 함수는 다른 함수 내의 오류를 해결합니다.다른 기능의 기능 사용
function [a] = algorithm1(z)
if (z==0)
j=1;
a=j;
disp('Your computer is switch on from state offline')
elseif (z==1)
j=1;
a=j;
disp('Your computer is working properly')
elseif (z==2)
%j=2; Value 2 for status of rebooting
disp('Your computer is rebooting')
j=1;
a=j;
disp('Your computer is working properly after rebooting')
else
disp('unidentified error')
end
end
내 문제는 그 해결책으로 위의 function(a)
를 취할 것입니다 다른 function(b)
을 만드는 방법이다. 이런 식으로 나오길 바랬다.
T=100 status 1, your computer is working properly
T=101 status 1, your computer is working properly
T=102 status 2, your computer is working properly after rebooting
.
.
.
T=200 status 1, your computer is working properly
T는 루핑 함수이고 상태 함수 (b)는 무작위로 생성된다. 함수 (a)를 함수 (b)에 제공하여 함수 (a)를 사용하여 오류를 계속 해결할 수있는 방법은 무엇입니까?
나는 항상 익숙하지 않은 용어가 잘못 사용 된 것을 볼 수 있기 때문에 이것을 알고있을 것입니다. 익명의 함수는 "함수 핸들이라고도하지 않습니다." 이 링크는 미묘한 차이를 나타냅니다. 나는 두 가지를 포인터와 메모리 주소와 같은 방식으로 생각하고 싶다. – horchler
@horchler 미묘하지만 중요한 차이점에 동의합니다. 나는 그것을 새롭게 할 것이다. 그게 가장 잘 표현 될 것이라고 어떻게 생각하십니까? – Suever