help: I need to solve the problem of the function "lsqcurvefit" I have an error when I started to run the program
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I have an error in the function "lsqcurvefit" that I have to use, I tried to solve the problem but I don't know what the error is exactly, I have to know that I respect the syntax of the function.?
Thank you for your help
4 Kommentare
Torsten
am 21 Mär. 2023
Neither the array "xdata" nor the array "ydata" appear in the definition of your function "fun". That's why you have only a single equation for the unknown vector x. I doubt this is what you want.
Antworten (1)
Cris LaPierre
am 21 Mär. 2023
Bearbeitet: Cris LaPierre
am 21 Mär. 2023
The error message mentions 'dot indexing', which means you have likely forgotten a multiplication symbol in your equation. I found this about halfway through your equation: Kth.x(2)
You probably meant to do elementwise multiplication: Kth.*x(2)
5 Kommentare
Cris LaPierre
am 22 Mär. 2023
I linked to the corresponding page in the documentation.
You could also just attach your excel file using the paperclip icon, but you also need to then share the code that loads that spreadsheet as well as the code that creates the variables used when calling lsqcurvefit.
Siehe auch
Kategorien
Mehr zu Historical Contests 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!