I wrote a code to calculate some values I insert in the Edit fields.
First of all do I have a DropDown Menu, with some values which I want to calculate with.
After I performe the calculation (with the value from DropDownMenu and values from EditField) do I want to return the result in an Edit field.
If run the programm and Insert all my values do I get the following error:
"Error using matlab.ui.control.internal.model.AbstractNumericComponent/set.Value (line 111)
'Value' must be a double scalar."
That's my code for the DropDown menu. I want to safe the value in the variable "app.d_th"
function aDropDownValueChanged(app, event)
app.d_th = app.aDropDown.Value
I have a Calculation Button which looks like this. I have shortened the entire calculation. that's just to show you how it looks. The goal is when I press the Button I want to performe the calculation and display it in the "ResultEditField"
function BerechnenButtonValueChanged(app, event)
value = app.BerechnenButton.Value;
d_th = app.d_th/1000
p_h = app.p_h * 10^5
m_flow = d_th.^2 + p_h
app.ResultEditField.Value = m_flow