How to load 3d.dat file

3 次查看(过去 30 天)
Aidan Shek
Aidan Shek 2020-1-6
评论: Aidan Shek 2020-1-22
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 %size of data
fileID = fopen('W11_64.dat','r');
A = fscanf(fileID,'%f');
fclose(fileID);
RefI = zeros(size,size); %line x columns
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

回答(1 个)

Selva Karna
Selva Karna 2020-1-9
share your input data?

类别

Help CenterFile Exchange 中查找有关 Low-Level File I/O 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by