Borrar filtros
Borrar filtros

plot 2 vectors not same length

1 visualización (últimos 30 días)
Alex
Alex el 20 de Feb. de 2017
Comentada: dpb el 20 de Feb. de 2017
Hi all,
i would like to plot 2 vecotrs not the same length ( velocity with 412 elements and time with 380169 elements), i tried this with the "griddedInterpolant command" but it doesnt work. I want that time-vector to have the same lenght as velocity-vector if that possbile. I will appreciate any help
  4 comentarios
the cyclist
the cyclist el 20 de Feb. de 2017
The code you posted shows that you don't understand even basic MATLAB syntax. I recommend that you go through some of the many freely available online tutorials. This page is a good starting point.
dpb
dpb el 20 de Feb. de 2017
"...[interpolate to] same length ( velocity with 412 elements and time with 380169 elements)"
Besides the other comments, you'll need the time corresponding to the velocity elements. Without, there's no way to know which to place where along the axis. One could assume (altho that's all it would be) that they're linearly-spaced with the first at point 1 and the last at the end of the time vector and just use the ordinal values but we have no way to know about that.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by