argument vector for smooth function plots
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I have arbitrary polynomial functions y=f(x) of a degree, say, N<30 and need to plot them over some predefined interval of x. Is it possible to choose the vector of x so that this particular type of function (i.e. polynomials) is plotted "smoothly", i.e. that there's no big accuracy differences between the intervals of a large slope and small slope of y?
If I simply choose x with some constant step, then some parts of the curve will be very accurate while the others will be inaccurate.
An expert opinion is also valuable because the speed is an issue, i.e. it's better not to call the diff function 1000 times, if possible.
2 Kommentare
Akzeptierte Antwort
Ilya
am 20 Mär. 2014
Bearbeitet: Ilya
am 1 Mai 2014
4 Kommentare
John D'Errico
am 2 Mai 2014
Bearbeitet: John D'Errico
am 3 Mai 2014
You THINK this is a reasonable thing to do, to work with high order polynomials in double precision. However, one day you will realize that you were kidding yourself.
Sorry, but working with polynomials of that high of an order (20-30) in double precision is a foolish thing to do in general. You MAY be successful with lower orders, depending on the domain of interest.
I see that you accepted your own answer, so you clearly know everything already.
Weitere Antworten (1)
John D'Errico
am 20 Mär. 2014
Use of 30'th degree polynomials is insane, at least in double precision. Period. INSANE.
If you are worried about accuracy, perhaps there is a reason why. Oh, that is right, you are using insanely high order polynomials.
Learn to use splines instead. Regain some degree of sanity.
Siehe auch
Kategorien
Mehr zu Polynomials finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!