Use a for loop to run an equation on set of data points
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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!
Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with Curve Fitting Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!