I have a 3d 64x64x64 data image and I would like to load it onto matlab in a form similar to this for 2d data to be viewed:
size=64
fileID = fopen('W11_64.dat','r');
A = fscanf(fileID,'%f');
fclose(fileID);
RefI = zeros(size,size);
for m = 1:size
for n = 1:size
RefI(n, m) = A(m+(n-1)*size);
end
end
I have attached the data I wish to be loaded
Thanks for your help
2 Comments
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/499133-how-to-load-3d-dat-file#comment_784393
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/499133-how-to-load-3d-dat-file#comment_784393
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/499133-how-to-load-3d-dat-file#comment_788759
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/499133-how-to-load-3d-dat-file#comment_788759
Sign in to comment.