MATLAB Answers

how to put a task that u repeat in some functions of a GUI, with one function

2 views (last 30 days)
Jhonsy Kevin
Jhonsy Kevin on 4 Nov 2019
Answered: Subhadeep Koley on 7 Nov 2019
I would like to know, how i can call the task that i want to define in a function inside of the same script belong to the GUI, for not repeat one code alot of times, if not define this task in a function and call this task with other functions. Thanks, i will be thanksful with examples.

  0 Comments

Sign in to comment.

Answers (1)

Subhadeep Koley
Subhadeep Koley on 7 Nov 2019
I assume you are using MATLAB App Designer. You can define helper functions, which can be used by other functions inside or outside your app. There are two types of helper functions: private functions, which you can call only inside your app, and public functions, which you can call either inside or outside your app. Private functions are commonly used in single-window apps, while public functions are commonly used in multiwindow apps.
See detail steps to create helper functions here.

  0 Comments

Sign in to comment.

Sign in to answer this question.