필터 지우기
필터 지우기

Need help on returning user defined function to app designer.

조회 수: 7 (최근 30일)
Sami Ahmet
Sami Ahmet 2020년 5월 5일
답변: Ashish Azad 2020년 6월 23일
Hey, I need help with designing a GUI. It is designed to convert units. I was wondering how I would link my function which converts units into the app designer function so that when I enter a number in an edit field and select a conversion type, eg celsius to fahrenheit, it would display the converted unit in the GUI.
  댓글 수: 1
Mohammad Sami
Mohammad Sami 2020년 5월 5일
편집: Mohammad Sami 2020년 5월 5일
The method to call the function is same.
You need to call an external function from inside the GUI code (example inside the edit callback). It will then return you the output.
You need to write code in your GUI to display this output in the desired UI element by setting its properties.

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

답변 (1개)

Ashish Azad
Ashish Azad 2020년 6월 23일
Just add a button for conversion and a text area(Edit Field) to display converted unit,
Now in the callback function of button, you can write the contents of your function inside it or call your own function from it and then assign output to the text area field of converted unit, something like this: app.EditAreaConvertUnit.Value=output;
Let me know if this helped.

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by