MATLAB Answers

How can i extend my graph to a certain point in the graph

67 views (last 30 days)
Para Nthaman
Para Nthaman on 27 Aug 2011
%how can i extend this graph to apoint x>16

Answers (2)

Walter Roberson
Walter Roberson on 27 Aug 2011
Are you asking about extrapolation of the graph beyond your last x value?
If so, then you need to decide how you want to do the extrapolation. You could do linear extrapolation from the last two points, or you could do cubic interpolation from the last three points. Usually these options are not very satisfactory.
To get better extrapolation, you would want to do curve fitting of the known data, and use the coefficients you obtain to plot out to your desired point.
If you want to do curve fitting, then you have the problem that there is no "right" or "wrong" method of curve-fitting, that there are literally an infinite number of different curves that can be fit to the same data and there is no mathematical way of deciding that one of them is the "right" curve.
Because of this, if you want to do curve fitting, you really should already have a mathematical model of what the structure of the equations should be: then you use the data to find the coefficients that best match the structure of the equation to the data.
The calls you would use within MATLAB to do the curve fitting would depend upon the structure of the equation you want to fit to, and also upon which toolboxes you have.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!