data = rand(8, 10);
fid  = fopen('File.data', 'w');
if fid == - 1
  error('Cannot open file for writing');
end
fwrite(fid, ndims(data), 'uint16');
fwrite(fid, size(data), 'uint64');
fwrite(fid, data, 'double');
fclose(fid);
The reading from C++ is equivalent: Read the number of dimensions as uint16, then the dimension itself as uint64 and then the actual data.

相关文章:

  • 2021-09-30
  • 2021-11-24
  • 2022-12-23
  • 2022-12-23
  • 2021-07-20
  • 2022-01-10
  • 2022-12-23
  • 2021-11-20
猜你喜欢
  • 2021-12-03
  • 2021-12-07
  • 2021-09-29
  • 2021-12-28
  • 2022-12-23
  • 2021-12-28
  • 2021-12-07
相关资源
相似解决方案