Use a for loop to run an equation on set of data points

2 次查看(过去 30 天)
I currently have a set of 10 (x,y) data points. I have an equation similar to this: y = c * (sin(x-B)) where c and B are unknown variables. I want to run this equation on every data point using a for loop and then have matlab give the values of the unknown variables for the best fit line produced from running this equation on every data point. This is very similar to using the cftool however when using that tool I got an error message saying the equation couldn't be evaluated. Furthermore, eventually I will have over 100 data sets that all need to be run through the equation. Therefore, I am hoping to use nested for loops to acheive this. Any help would be greatly appreciated, thank you!

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with Curve Fitting Toolbox 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by