How to convert a script with call backs to uitable into function
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
I have a script with two callbacks to two uitables, how can I convert this into a function
Antworten (1)
Robert U
am 7 Sep. 2017
Hi Snjeev Kumar,
from the information you provided the easiest way to create a function would be
function myFunctionName(~)
<- insert your script here ->
end
Kind regards,
Robert
2 Kommentare
Sanjeev Kumar
am 7 Sep. 2017
Robert U
am 7 Sep. 2017
While using functions variables have to be placed in the function workspace. Variables that have been used in main workspace are not available unless they are defined as global (should be omitted).
If you need variables from outside function workspace you have to pass them. See https://de.mathworks.com/help/matlab/programming-and-data-types.html
And as I wrote: "from the information you provided..."
Diese Frage ist geschlossen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!