Hello,
having this error :
Error using svd Input to SVD must not contain NaN or Inf. Error in pinv (line 29) [U,S,V] = svd(A,0);
I tried to add this test before calling pinv(gradVcpr) :
if any(isnan(gradVcpr) | ~isfinite(gradVcpr)) % Error : gradVcpr is NaN or infinite
...... return % stop executing the function before call to pinv
end
But the test doesn't work : I still have the same error. Can somebody help me ?
Thank you !
Best Answer