Trying to plot two vectors of unequal lengths on the same X and Y axes
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Michael Bochert
el 25 de En. de 2025
Comentada: Sreejith Thazhathe Veetil
el 26 de En. de 2025
Hello, I am trying to plot two vectors of unequal lengths on the same set of axes. One potential solution I have thought of is to bin the longer vector, such that the number of bins equals the length of the smaller vector. Then, I could take the average within each bin. However, I dont know how I would go about doing this, or if there is some other way.
I would appreciate any help in trying to figure this out! Thank you!
1 comentario
Respuestas (1)
Star Strider
el 25 de En. de 2025
There is probably no good way of doing this without compromising the data in some way.
The way I would choose would be to to use the interp1 function to equalise thier lengths. How you choose to do that (shortening the longer vector or lengthening the shorter vector) is your choice. Either way, this creates data where none previously existed.
There might be a better way, however knowing nothing about your vectors, I cannot determine what that may be.
0 comentarios
Ver también
Categorías
Más información sobre Polar Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!