Error when fitting polyfit curve
Afficher commentaires plus anciens
Trying to plot a polynomial curve onto my time series but keeps coming up with 'Inputs must be floats, namely single or double'
This is the code I've got:
% plot time series
X = Months;
X = categorical({'March','April','May','June','July','August','November'});
M = reordercats(X,{'March','April','May','June','July','August','November'});
Y = AverageDO;
plot(M,Y,'*');
p = polyfit(M,Y,1);
The excel sheet attached is the timeseries data.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Time Series dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!