How MATLAB move between discrete measurements

Hi there
when we have discrete measurements of speed or temperature, based on what MATLAB draw a scatter curve between these points ?
Thanks in advance.

 Respuesta aceptada

Image Analyst
Image Analyst el 22 de Dic. de 2014

0 votos

See my spline demo, attached, which will produce the plot below:
The red are the original data points, and the blue are the spline interpolated points. You can take the markers off the blue curve, and not plot the red curve, and plot the original data with big blue dots and it will look just like your curve.

2 comentarios

ameen
ameen el 22 de Dic. de 2014
Thank you for your kind reply and the very useful code
Image Analyst
Image Analyst el 22 de Dic. de 2014
You're welcome. You can thank people also by Voting for their answer or Accepting their answer.

Iniciar sesión para comentar.

Más respuestas (1)

dpb
dpb el 19 de Dic. de 2014

1 voto

By plot, scatter, etc., simply straight line interpolation between points.
Use cftool or one of the specific fitting methods to fit a functional form or could use interp1 and an interpolating option other than linear to do some other form.

5 comentarios

ameen
ameen el 21 de Dic. de 2014
Thank you for your answer.
I have some measurements versus time and i plot it as a curve but my supervisor ask me to explain how this curve move between discrete measurements ??
dpb
dpb el 21 de Dic. de 2014
Well, can't see your monitor from here...what did you do to create the plot?
ameen
ameen el 21 de Dic. de 2014
:)
I am talking about any plot or curve. How MATLAB move between data points we have ? Polynomials ? or Algorithms ?
I found something about Catmull-Rom curves. Here is an example of plots i made.
dpb
dpb el 21 de Dic. de 2014
Well, clearly it was something other than straight line -- but you still didn't say what specific function you used to create the plot. There are many possible choices; which you did, specifically, I have no idea unless you show/tell us what you used as I said in the very first response.
That looks like it probably was a smoothing spline, given the shape of the curve, however.
Again, how, specifically, did you create the plot in Matlab?
ameen
ameen el 22 de Dic. de 2014
Yes this is a smoothing spline

Iniciar sesión para comentar.

Categorías

Preguntada:

el 19 de Dic. de 2014

Comentada:

el 22 de Dic. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by