I use GUIDE to write a GUI to solve three consecutive differential equations. In the run button, I need to call three additional equation functions, but the three equations cannot be used as m files alone (because the parameters between the three equations are related to each other). Need to be placed as a nested function at the bottom of the gui m file, but the GUI does not seem to recognize the parameters inside the nested function, and use ‘n=str2double(get(handles.edit4,'string'))' , The command found that the input parameters could not be read. What should I do with this situation? Thank you
For example, here is an equation function script for me. In this function, I need to call the result of the previous equation as a parameter and not as an external independent function. Therefore, I can only handle it as a nested function. ，so how can i do it ?
du=[u(2);alpha*(phi1*phi3*mp*K2*u(1).^n - phi1*K2*n.*u(1).^(n-1) - ...
phi1*phi3*mp*p0*pi*a^m/ap^(m-2) - phi2*p0*pi*R*m*a^(m-1)/(2*a*ap^(m-2)))*u(2)-(Fmix/M)];