1
$\begingroup$

I have some values imported from excel about the annual sell of a product, with 3 var:

month, price, sold items

I have seen how to plot a chart using curve fitting tool but I need to define a math expression that can describe the relation between these variables.

How can I do this in matlab? Is there any tool that can achieve this automatically. If you look at the chart should exist a way to use an approximation that can mime the behavior(maybe with spline functions or n-point-hermit), is enough one approximated expression of the model that for the 3 var replicates a similar graph if plotted.

$\endgroup$
9
  • 1
    $\begingroup$ Do you have any intuition as to what kind of function you want to model the data with or any indication as to what might make a good candidate function to model the data based on visual inspection? $\endgroup$ – Paul Dec 8 '15 at 15:41
  • $\begingroup$ @Paul no I haven't such intuition for this reason I'm looking for a way to compute it. $\endgroup$ – AndreaF Dec 8 '15 at 16:13
  • $\begingroup$ You might want to plot the data to see any trends. $\endgroup$ – nicoguaro Dec 10 '15 at 18:12
  • $\begingroup$ Generalized linear models are the best starting point for fitting models to such data. You have to convert the categorical "month" variable into a numerical value and then do the fitting. R has several built-in functions that do the job surprisingly well. $\endgroup$ – Biswajit Banerjee Dec 10 '15 at 20:58
  • $\begingroup$ I have yet plotted a fitting 3D graph with matlab, I need a way to generate also an expression in function of these var. with the standard fitting that I know I have obtained only a polynomial interpolation expression that isn't in function of the 3 variables $\endgroup$ – AndreaF Dec 10 '15 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.