Manually interpolate a 2D array
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Ilias Seferoglou
am 25 Nov. 2019
Kommentiert: Angelina Papathanasiou
am 25 Nov. 2019
Hello,
Basically I have a question on how to manually interpolate a 2D array:
Let's say I have a 80 x 100 array and want to make it into 100 x 120. I want to increase the size of my array, and interpolate the values of the initial array.
Can anyone help me with this matter?
Thanks alot
0 Kommentare
Akzeptierte Antwort
Andrei Bobrov
am 25 Nov. 2019
a = rand(4,8);% Let a - your array
F = griddedInterpolant(a);
[i,j] = ndgrid(linspace(1,4,10),linspace(1,8,12)); % grid for new array 10 x 12
out = F(i,j); % new array
1 Kommentar
Angelina Papathanasiou
am 25 Nov. 2019
I had the same question but I have the constraint that I cannot use complex commands (griddedInterpolant(), ndgrid()). Is there a way of receiving the same answer without them?
1.Can I use meshgrid() instead of ndgrid()? Is there a simple way to do the same without gridderInterpolant(), using "first pricinples"?
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Interpolation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!