Dec 18, 2003 #1 Anerol Civil/Environmental Joined Dec 18, 2003 Messages 8 Location CA My matrix contains NaN values. How do I create a new array from my matrix without including the NaN values? Help! Thank you thank you =)
My matrix contains NaN values. How do I create a new array from my matrix without including the NaN values? Help! Thank you thank you =)
Dec 18, 2003 #2 MikeyP Aerospace Joined Mar 5, 2002 Messages 940 Location GB If you want to replace NaNs with zeros in the matrix A you can use the "find" command: Something like... A(find(A==Nan)) = 0; M -- Dr Michael F Platten Upvote 0 Downvote
If you want to replace NaNs with zeros in the matrix A you can use the "find" command: Something like... A(find(A==Nan)) = 0; M -- Dr Michael F Platten
Dec 30, 2003 #3 smesajar Electrical Joined Dec 30, 2003 Messages 3 Location CO You can also do this if you want to delete the NaN's A(A=NaN)=[]; Upvote 0 Downvote