필터 지우기
필터 지우기

How do I delete certain parts of a cell array and interpolate it when needed? Without using signal processing toolbox.

조회 수: 1 (최근 30일)
Hello.
I have a cell array of 8 rotation speed with its measured values. (20000:-2500:2500)rpm
I want to shrink the size of each array from 8192 into 2048. Which means, I only want to take the 1st, 5th, 9th, etc values. Because later, I want to interpolate the missing values and see how different it is. For example, I want to get the the 3rd value of the rotation speed of 3750rpm by interpolating the missing values of the shrinked array. Any ideas on how to do so?
Originally, what I did with the original cell array was:
% a is the cell array with the measured values
q = 20000:-2500:2500;
interval = abs(interval);
f = floor(input_rotation/interval);
lower = f * interval;
upper = (f+1) * interval;
for i = 1:Start_i_len
if lower == q(i)
i_lower = i;
end
if upper == q(i)
i_upper = i;
end
end
Offset_diff = a{i_upper} - a{i_lower};
Offset_diff_drehzahl = Offset_diff / (q(i_upper) - q(i_lower));
n = input_rotation - q(i_lower);
Offset_input_rotation = a{i_lower} + (n * Offset_diff_rotation);
Thank you very much!

답변 (1개)

Walter Roberson
Walter Roberson 2022년 3월 1일
cellfun() resample()

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by