- #1
Void123
- 141
- 0
Hi guys:
I have a program which is supposed to fit x- and y-data to a certain function and give me the optimum parameters. This is no problem. What I want to do though is to perform a for loop that allows me to plot the CHANGE in those parameters over time (as I conduct a real life experiment). The code is something like this (an example):
for i=1:5
pause(1)
execute_function;
[estimates, model] = fitcurvedemo(xdata, ydata)
end
The output will give me five iterations of the fitted parameters (which I have a separately written program for which works), but I want to collect them into a single column and plot them against the time (i), which in this case is 1 second intervals.
I hope this is clear.
Thanks.
I have a program which is supposed to fit x- and y-data to a certain function and give me the optimum parameters. This is no problem. What I want to do though is to perform a for loop that allows me to plot the CHANGE in those parameters over time (as I conduct a real life experiment). The code is something like this (an example):
for i=1:5
pause(1)
execute_function;
[estimates, model] = fitcurvedemo(xdata, ydata)
end
The output will give me five iterations of the fitted parameters (which I have a separately written program for which works), but I want to collect them into a single column and plot them against the time (i), which in this case is 1 second intervals.
I hope this is clear.
Thanks.