Info

This question is closed. Reopen it to edit or answer.

Scaling arrys to each other

1 view (last 30 days)
Mathieu
Mathieu on 19 Oct 2014
Closed: MATLAB Answer Bot on 20 Aug 2021
Hi,
I have multiple arrays and I want to plot them all on to the same figure. The problem however is that some arrays have fewer rows than the others, so that they stop earlier in the figure. I was wondering if there is a way to stretch all the matrix to have the same length since I want to compare the progress of all the arrays over time. But that is hard when they don't have the same length.
On the following image you can see that one plot already stops at around 250 windows, while the other stops at around 350. I want the one that stops at 250 to be stretched to 350 as well. Is this possible?

Answers (1)

dpb
dpb on 19 Oct 2014
doc interp1
or if have Signal Processing Toolbox
doc resample
Or, if possible, collect a time stamp with the data if they're being collected over the same time just at different sampling rates. Otherwise, it doesn't seem like simply "stretching" the short ones makes much sense???

Tags

Community Treasure Hunt

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

Start Hunting!