![]() I have a file with NaN values in almost every column and row. On Mon, at 2:48 PM, Doina Gumeniuc (224252 MAHS) > wrote: csv file, the correct string that is interpreted as NaN is "nan" without the quotes. ParaView understand NaN correctly as blanks. I was thinking it is because of my NaN values. I am using a vtk poly data file, which when I load in paraview, it gives me error (paraview just stops working). ![]() On Mon, at 4:10 PM, Doina Gumeniuc (224252 MAHS) > wrote: Originally, instead of NaN there are zeros, but I just need blanks without changing the shape of the matrix, which is why I use NaN, but it gives me error in paraview. I make the vtk file in matlab by extracting the information from a. Sadly I can not import the whole file, but here is an example: The following should be the correct representation of that:įrom: ParaView on behalf of "Doina Gumeniuc (224252 MAHS)" In the example you sent us, I presume that you mean to have 4 line cells with 2, 3, 2, and 2 vertices, respectively. It looks like you can solve your problem by simply not writing out the NaN’s in the fill. The LINES connectivity list allows you to vary the length of the line chain. However, I do not see why you need NaN at all. It worked fine.) However, you are trying to introduce NaN’s in a list of integer connections, which is just wrong on many levels. To: Doina Gumeniuc (224252 MAHS) Mathieu Westphal paraview at So my question would be again, is it possible to replace it with anything else? If I ask matlab to delete the zeros from my file, the shape of the matrix will change, so the only solution I found so far is to replace the zeros by NaNs in matlab, which gives me error in paraview, for the reason you, Moreland, explained. There is a bit of a problem though: In reality, this file is much more bigger and deleting the NaNs by hand is not an option (also I am trying to make it all happen automatically). To: "Moreland, Kenneth", Mathieu Westphal, " paraview at " (This, of course, runs the danger of removing a NaN from elsewhere in the file that you want.) ![]() For example, you should be able to use sed to remove all instances of the string NaN from the file. If for whatever reason you cannot do that (maybe you are using someone else’s Matlab file writing script and don’t want to or can’t change it), then you could probably automatically remove all the NaN’s with a script after the fact. I appreciate that the matrix you are storing the data in Matlab has to be dense, but why do you have to write every entry of the matrix into the file? Write a for loop over the dimensions of the matrix and conditionally write a number if it is not NaN. The simplest way should be to change the Matlab script that writes the file in the first place. I was saying that the file is being written incorrectly, and you need to change the way you are saving it. I wasn’t trying to suggest removing all the NaN values by hand. Next message: Supercomputing 2017: Schedule for talks at the Kitwareěooth.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |