So I am trying to write the coefficients from nonlinear fits I'm doing to an array, but the loop function is writing over the values so I wind up with only the coefficients from the last fit. This is a portion of my code so far.
for Replicate_Loop = 1:Num_Days
Model = char(Equations(Model_Loop,1));
ft_NoZeros = fittype(Model,'independent', 'x', 'dependent', 'y' );
[fitresult_NoZeros, gof_NoZeros] = fit( xData_NoZeros, yData_NoZeros, ft_NoZeros, opts);
I'm fairly new to Matlab, so I'm getting a bit lost when it comes to writing the values for each fit including nesting other for loops in, but I don't know the syntax very well. Any help would be really appreciated! Thank you!