Spline interpolation of 4D matrix
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello everyone,
I have a 4D matrix A of size 450x450x60x3. This matrix corresponds to images measured at different power levels, B. Where each pixel in A was measured with a different powerlevel. So I have a another matrix B of size 450x450x60x3. I want to perform a spline interpolation of A for power level [1.3, 1.7, 2.3]. What would be the best way to do this? Should I be treating this problem as a 3 times 1D interpolation or do I need to use gridded data? If so, how can I do this?
Thank you :)
0 Commenti
Risposte (1)
KSSV
il 18 Ago 2022
A = rand(450,450,50,3) ;
B = zeros(size(A)) ;
for i = 1:450
for j = 1:450
for k = 1:50
B(i,j,k,:) = interp1([1 2 3],squeeze(A(i,j,k,:)),[1.3 1.7 2.3]) ;
end
end
end
3 Commenti
KSSV
il 18 Ago 2022
What is B1??? It seems in B1 the values are not in increasing order....they are supposed to be monotonically increasing.
Vedere anche
Categorie
Scopri di più su Interpolation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!