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.
0 个评论
回答(1 个)
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
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!