Fitting 3D data into a function
11 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Nikola Ristic
il 15 Mag 2023
Risposto: John D'Errico
il 15 Mag 2023
I have some data that I want to fit in a function. To be more clear, the data points depend on time, as well as the the radial and longitudinal coordinate. I would like to fit these data points into a function of the form f(r, z, t). I know I can fit data into a surface using fitobject = fit([x,y],z,fitType). However, I need a function in the form of fitobject = fit([x,y,z],f,fitType). Is there such a thing in Matlab? I failed to find it. Preferably, I would like to fit it into a polynomial.
0 Commenti
Risposta accettata
John D'Errico
il 15 Mag 2023
The curve fitting toolbox does not fit models with more than 2 independent variables.
You can use my polyfitn tool, found on the file exchange, to fit a polynomial model in multiple dimensions.
0 Commenti
Più risposte (1)
Image Analyst
il 15 Mag 2023
Have you tried the Regression Learner app on the apps tab of the tool ribbon? You give it a set of input predictors, and a set of ground truth response values (the "true" values that you are going to train the model with) and then you can test a wide variety of models with it. You can choose the best model, which might or might not be a polynomial, and you might not have an analytical function/formula to write down, but that should not matter. All that matters is if you put in a set of predictors, you get a reasonable estimate for what the "true" value should be.
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
0 Commenti
Vedere anche
Categorie
Scopri di più su Linear and Nonlinear Regression in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!