Dec 18, 2003 #1 Anerol Civil/Environmental Dec 18, 2003 8 0 0 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 Mar 5, 2002 940 0 0 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 Dec 30, 2003 3 0 0 CO You can also do this if you want to delete the NaN's A(A=NaN)=[]; Upvote 0 Downvote