Accessing the nested function outside of its main function

I'm using Matlab R2007b and I've got a function like this:
function output = myfun()
myfun.met1 = @nesfun1();
myfun.met2 = @nesfun2();
function ret1 = nesfun1()
%nested function 1
end;
function ret2 = nesfun2()
%nested function 2
end;
function ret3 = nesfun3()
%nested function 3
end;
end;
So I can use the first 2 nested functions from outside:
x = myfun;
a = x.met1;
b = x.met2;
But I need to access to the 3rd nested function for automatic testing purposes. Is it a solution for this, or the 3rd nested function "private" property cannot be by-passed?

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2012년 8월 2일
편집: Azzi Abdelmalek 2012년 9월 12일

0 개 추천

I think you can't acces any of your nested function, check if your first nested function does'nt exit in your folder.

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

질문:

2012년 8월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by