vendredi 22 janvier 2016

I can't find the issue

I have this code in Matlab:

for k=1:10
    for l=1:301
        Psca_test(Phi(k,l),Theta(k,l)) = Psca_int(Phi(k,l),Theta(k,l));
        if Psca_test(Phi(k,l),Theta(k,l)) == 0
            Psca_test(Phi(k,l),Theta(k,l)) = ...
                interp2(Psca_test(Phi(k,l),Theta(k,l)),'cubic');
        end
    end
end

It copies values of arrays from Psca_int matrix defined by k and l from Phi and Theta matrices into a new matrix, Psca_test. For some reason, I have zero values in Psca_test that I want to interpolate within the range of k and l. For some reason, the Matlab, doesn't go inside the loop while I have zero values in Psca_test within the range. I don't understand the problem. It should be something wrong with if condition. Psca_test is uint8. Please help me.

Aucun commentaire:

Enregistrer un commentaire