Why do I receive errors using IFANBEAM for matrices with NaN values in Image Processing Toolbox 7.2 (R2011a)? I am trying to use the function IFANBEAM on a matrix with NaN values and receive a warning and an error depending on how many NaNs the matrix contains. An example of the code, warning and error message follow: A = rand(10, 10); b = 100; good_result = ifanbeam(A, b); A(10, 1:9) = NaN; some_result = ifanbeam(A, b); A(10, 10) = NaN; bad_result = ifanbeam(A, b); Warning: NaN found in Y, interpolation at undefined values will result in undefined values. > In interp1 at 177 In fan2para>fan2paraInterp at 231 In fan2para>fan2paraInterp at 221 In fan2para at 196 In ifanbeam at 191 In my_program at 8 Warning: All data points with NaN in their value will be ignored. > In polyfun\private\chckxy at 101 In spline at 54 In interp1 at 274 In fan2para>fan2paraInterp at 231 In fan2para>fan2paraInterp at 221 In fan2para at 196 In ifanbeam at 191 In my_program at 8 Error using chckxy (line 104) There should be at least two data points. Error in spline (line 54) [x,y,sizey,endslopes] = chckxy(x,y); Error in interp1 (line 274) yiMat = spline(xCol.',yMat.',xiCol.').'; Error in fan2para>fan2paraInterp (line 231) Fsh(i,:) = interp1(thetaDeg-gammaDeg(i),F(i,:),pthetaDeg,interp); Error in fan2para>fan2paraInterp (line 221) P = fan2paraInterp(Fpad,d,gammaDeg,thetapad,... Error in fan2para (line 196) P = fan2paraInterp(F,d,... Error in ifanbeam (line 191) [P,oploc,optheta] = fan2para(F,d,... Error in my_program (line 8) bad_result = ifanbeam(A, b);
Kshitij Singh answered .
2025-11-20