I'm new to Matlab and I'm currently trying to save the fitting results (cfit) to a txt file. The txt should come with columns for each of the fitting parameters and separated by tabs.
I'm taking the results of the fitting as
[cf,gof] = fit(freq,data,ft_,fo_);
vals = [cf.a,cf.b,cf.c];
and I'm trying to save it to a txt file by using:
fprintf(fileID,'%s \t %7f \t %7f \t %7f \n',token,vals);
but I'm frequently getting the error: "Function is not defined for 'cell' inputs." How do I have to transform the fitting output in a way that it can be handled by fprintf and get everything saved to a txt file?
Thanks!