Hi everyone, how can i convert a 2500x21 matrix into 2500x42 matrix by using cubic/spline interpolation.

1 回表示 (過去 30 日間)
Hi everyone, how can i convert a 2500x21 matrix into 2500x42 matrix by using cubic/spline interpolation.

回答 (1 件)

KSSV
KSSV 2018 年 9 月 12 日
A = rand(2500,21) ;
B = zeros(2500,42) ;
for i = 1:2500
B(i,:) = interp1(1:21,A(i,:),linspace(0,21,42),'spline') ;
end
This can be vectorised using bsxfun

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

製品


リリース

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by