holding a vector value for specific time
7 次查看(过去 30 天)
显示 更早的评论
I have been wracking my brain trying to figure this out. I have a 1xn vector I have gained through signal processing. I am multiplying it to another 1xn vector with a different scale.
the first vector Xb moves to the next value every 1/1.023e6 seconds the second vector Xc moves to the next value every 1/1.405e6 seconds.
I am looking for a way that I can transform keep Xb's 1xn dimension, but hold the values over a sample time of 1/1.405e6 seconds. for example the first ten values of:
Xb=[-1 1 -1 -1 -1 -1 1 1 -1 -1]
Xc=[0 1.41373858718699, 0.0732749615049943, -1.40994069977540, -0.146353076113111, 1.40235512765087, 0.219038025739767, -1.39100224880207, -0.291134548504378, 1.37591256176390]
The time scale difference makes it so Xb has the same value for the first 6 values of Xc, but this is not a constant feature when comparing the vectors. Does anybody have a clue how to do this?
1 个评论
Jan
2011-10-5
I do not understand the connection between Xb and Xc with 1/1.023e6 and 1/1.405e6 seconds. It does not look like Xb has the same value for the first 6 frames in opposite to the last paragraph of your question. In addition I do not understand, _what_ is not a constant.
Please post the available inputs, the wanted outputs and the definition for the calculation.
回答(2 个)
Daniel Shub
2011-10-5
It sounds like you want to change the sample rate of Xb to match that of Xc. You can do this with resample
doc resample
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Signal Processing Toolbox 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!