MATLAB: Sum of numeric field boxes must equal 100 before user can press a plot button.

conditionsMATLABnumeric field boxplot buttonsum

I have four numeric field boxes on app designer where the user inputs a value between and including 0 and 100 for each box. Once the user has input this, they will press a plot button to run the program.
How can I make it such that the sum of the four numeric field boxes must equal 100, otherwise the user cannot press the plot button?
Thank you

Best Answer

  • Check the attached app for an example of how it can be done.