In MATLAB App designer,
I am trying to learn how to create a private function and use it in another callback function (let's say of a certain button).
I created the function, but I have trouble setting the parameters and calling it in the other callback function.
In C++ code,
int product (int num1, int num2)
{
int result;
result = num1*num2;
return result;
}
void another function()
{
int num1;
num1 = 2;
int num2;
num2 = 3;
int x = product(num1,num2);
return;
)
My MATLAB private function only computes 1 value (an array) and need to return this array when called.
Can someone please help?
Thank ypu

 채택된 답변

Ameer Hamza
Ameer Hamza 2020년 5월 11일

1 개 추천

Check the code in the attached app to see how to define and use private functions in App-designer.

댓글 수: 2

Adham Elkhouly
Adham Elkhouly 2020년 5월 11일
Thank you so much
Ameer Hamza
Ameer Hamza 2020년 5월 11일
I am glad to be of help.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

제품

릴리스

R2019b

질문:

2020년 5월 11일

댓글:

2020년 5월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by