read data to plot
17 views (last 30 days)
Hello, I'm trying to read the data in the zip file attached with this code but I'm getting errors, not sure how I could plot the data contained in this file? any help will be greatly appreciated. Thanks
%centroids (improve this by averaging the 4 corners)
b=reshape(a(nx*ny*2+1:end),[nx-1,ny-1,nfields]);%nine dependent variables
view(2);shading flat;axis image;axis([-1,1,-1,1])
Debraj Maji on 14 Nov 2023 at 12:23
I see that you are trying to read data form a file with a .DAT extension. I have downloaded the zip file shared and upon inspection have found that there is a mismatch in the file name used for reading the file. You can find the required correction below:
The corresponding figure obtained using the shared data is attached below:
Make sure to add the path for the data file is added before the script is run.
I hope this helps!