I\'m kind of new to MATLAB and I\'m doing some experiments for a school project.
What I want is a GUI with 3 buttons, when you press either of the first two, it adds up
The following is not the best practice for large complicated programs, but for something simple like what you're trying to do it sounds like global variables would be perfect. Say that X
, Y
, and Z
are the variables you want to share between functions. Add the following at the beginning of every function that uses them, and they will all have access to the same values.
global X Y Z