How can I find all zeros in a 2d matrix and change those values by interpolating with the closest available values ?
Mostra commenti meno recenti
For example, A=
Risposta accettata
Più risposte (1)
Walter Roberson
il 7 Giu 2017
[gr, gc, gv] = find(A);
F = scatteredInterpolant(gr, gc, gv);
[br, bc] = find(~A);
replacements = F(br, bc);
A( sub2ind(size(A), br, bc) ) = replacements;
Categorie
Scopri di più su Interpolating Gridded Data 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!