I am developing a GUI where I ask the user what data they want to regress, and to select the functional form of the data regression. The GUI will then gather the correct data, and regress the data using the fit() function. This will generate a cfit class variable. This is what I have working.
Next I would like to be able to take the regression of that data and pass it into a separate function so that I can manipulate it.
Simply it can be described as follows:
X = [];
Y = [];
regression = fit(X, Y, FitType, opts);
[new_line] = ModifyLine(X, Y, regression)
When I try to run the code as show above I get the Error:
Undefined function 'File_Name' for input arguments of type
'cfit'.
My regression function is properly formatted because I am able to plot the data and the regression at the end of the function.
I know I could generate the fit function as a sub function to ModifyLine however this would start to require me to pass in and out an excessive number variables.
Does anyone know how to pass a cfit type into a function? or a way to bypass the pass through statement and directly import from the other function?
Thanks