How to use a GUI to set the polynomial level for a graph after examining the data
Mostra commenti meno recenti
Hi there - me again!
I'm trying to make my program more and more clever but keep falling down when not understanding how to enter variables into functions of Matlab that expect a certain order. My bit of code I've made nicely shows the graph I want to fit the curve to, but, when the user enters the polynomial level, I can't get fit() command to use it.
Any help appreciated! Should I be using a different command to fit()?
% Fit a polynomial to the data
prompt2={'Enter the level of polynomial to use):'};
% Create all text fields with the questions specified by variable prompt
box2title='Polynomial Selection';
% The main title of your input dialog interface.
answer2= inputdlg(prompt2,box2title);
[Width_fit, gof] = fit( v1,wdth, answer2, 'Normalize', 'on' );
It's exspecting things like 'poly5' rather than just 5.
Thanks
Vadim
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Get Started with Curve Fitting Toolbox in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!