I guess, that static text has the handle "handles.Ca1". Then:
set(handles.Ca1, 'String', sprintf('%g', Ca1e));
This concerns the other set() commands of your code also.
Setting the 'Value' does not seem reasonable. The Values of uicontrols are e.g. the on or off status of a toggle buttons or check boxes, or the current value of a slider, or the indices of selected elements of a listbox. The appearing string is defined by the 'String' property.
If you get an error message like:
Error using set
Conversion to double from struct is not possible.
and do not understand it, the first thing to do is reading the docs:
There your find examples which shows, how the command is used. If this does not shed light on the problem already, use the debugger: Set a breakpoint in the failling line and run the code again. When it stops, check the value of the used variables:
Then compare the values with the documentation. For the set() command you would find, that it has 3 (or 5 or 7 etc) inputs, but not 4. The first is the handle, then the property and finally the new value. But in your case the first input is the handles struct, not one handle of a gui element.
These steps help you, to solve problems by your own.
Best Answer