How can I compile a function that uses a modified INPUTDLG function?

조회 수: 3 (최근 30일)
Ben
Ben 2011년 8월 15일
댓글: Mobasshir Hossain Akash 2018년 6월 12일
Hi all,
I am using a modified INPUTDLG function, newid.m. The function needs to be saved in the same directory as the INPUTDLG function in order to work - "Since it is dependent on several private functions, newid.m will only work if stored in this location." I'm now trying to compile a function that utilizes newid.m using deploytool, but my executable throws an error whenever it calls newid. Is there a way to include a function that needs to be in the toolbox path?
Thanks,
Ben

답변 (2개)

Chirag Gupta
Chirag Gupta 2011년 8월 15일
Just a thought: What if you included inputdlg? (also make sure that newid is being included)
Something like: mcc -m yourmainFucn.m -a inputdlg.m -a newid.m
Another thought: In your main function, you could include inputdlg like:
if (false)
inputdlg('Workaround');
end
Another solution might be to use function pragma in your code
%# function inputdlg

Ben
Ben 2011년 8월 15일
Thanks for the suggestions, Chirag. It looks like newid.m relies on two private functions, getnicedialoglocation.m and setdefaultbutton.m, so just including those along with newid.m appears to work.
  댓글 수: 1
Mobasshir Hossain Akash
Mobasshir Hossain Akash 2018년 6월 12일
Can you upload those two function here? I modified my code and found the same error.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by