Interpolating 2D matrix
Mostra commenti meno recenti
I am trying to interpolating the matrix below. I would like to end up with an n by 3 matrix, and so my interpolation needs to be done row-wise
matrix = [221 188 0
215 201 0
210 213 0
197 231 0
162 236 0
125 225 0
78 199 0
74 196 0
49 144 48
46 125 83
44 93 127
50 48 173
57 0 202
60 0 216];
3 Commenti
Star Strider
il 14 Ott 2017
The second column is not monotonically increasing. If I understand correctly what you want to do, that is going to cause problems for the MATLAB interpolation functions.
Jim Parsons
il 14 Ott 2017
Star Strider
il 14 Ott 2017
Making the second column monotonic would necessarily make the first column non-monotonic. The second column also has duplicate values in the last two rows (as depicted in your Question), again destroying the monotonicity of the column.
I see no specific solution.
Risposte (1)
Matt J
il 14 Ott 2017
0 voti
INTERP1 will do column-wise interpolation. You can apply it to the transpose of your matrix.
2 Commenti
Jim Parsons
il 14 Ott 2017
Matt J
il 14 Ott 2017
Glad to hear, but please click "Accept" if that's the case.
Categorie
Scopri di più su Interpolation in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!