how to slice a 3d complex valued matrix

조회 수: 5 (최근 30일)
stefano fiorentini
stefano fiorentini 2016년 6월 15일
편집: stefano fiorentini 2016년 6월 16일
Hello,
I'm working with a 3D complex-valued matrix (2D + time). Let's call it B. I'm trying to extract a 2d matrix (1D + time), called A, from B by interpolating values along an arbitrarily oriented segment at every time frame. The segment is defined as a collection of query points (xq, yq are N-by-1 vectors) that do not change between frames. No interpolation is performed along the time dimension. I've accomplished the job by using interp2 in a for loop, therefore by filling the 2d matrix column by column:
A = zeros(length(xq), size(B,3));
for k=1:size(B,3)
A(:,k) = interp2(X, Y, B(:,:,k), xq, yq);
end
I'm trying to figure out a more efficient way to do this. Unfortunately slice() is not an option as it does not work with complex data. I've looked for interp3() and griddedinterpolant() in the documentation, but I haven't found any example that matches my problem. I've also performed some research in this forum, but to no avail.
Any hint? Thank you for your help.
Stefano

답변 (0개)

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by