how to slice a 3d complex valued matrix
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!