Info
This question is closed. Reopen it to edit or answer.
How I can insert rows of zeros at beginning of a smaller matrix (X) until value of X(1,1) is less than or equal to first value encountered in column 1 of a longer matrix Y by n rows? n varies based data for Y. Resizing array X to be same size as Y.
1 view (last 30 days)
Show older comments
Can you please help with how I can insert rows of zeros at the beginning of a smaller matrix (X) until the value of X(1,1) is less than or equal to the first value encountered in column 1 of a longer matrix Y by n rows? The row length n will always vary due to different data files imported for Y. The intent is to resize X to size of Y.
5 Comments
Stephen23
on 12 Apr 2018
Edited: Stephen23
on 12 Apr 2018
@Thomas Gunther: there are two separate topics to consider here:
- finding a common epoch (i.e. synchronizing to the same time).
- ensuring that the samples occur at the same time (e.g. interpolating, subsampling), if required.
Basically you have this:
TB1: S1 S2 S3 S4 S5 S6 ...
TB2: S1 S2 S3 S5 ...
TB3: S1 S2 S3 S4 S5 ...
Were they started by the same trigger, or do they use the same time signal? Do you have a common epoch for the sample times? Once you have that, then I see no reason why you could not interpolate, if required. If the samples are spread widely then interpolation may not be useful anyway. It depends on your data.
Answers (0)
This question is closed.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!