Problem with the interp function

4 次查看(过去 30 天)
"Error using interp (line 68)
Length of data sequence must be at least 9.
You either need more data or a shorter filter (L)."
How might I be able to fix this?
  1 个评论
Walter Roberson
Walter Roberson 2019-11-15
Is it the case that for any input vector [a b c] with factor 3, that the output would be [a, 2/3*a+1/3*b, 1/3*a+2/3*b, b, 2/3*b+1/3*c, 1/3*b+2/3*c, c]

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2019-11-15
编辑:Walter Roberson 2019-11-15
out_vector = [reshape((reshape(diff(time_vector), [], 1) * (0:factor-1)/factor + reshape(time_vector(1:end-1),[],1)).',1,[]), time_vector(end)];

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multirate Signal Processing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by