How to improve bit reading process in Matlab?

2 次查看(过去 30 天)
I need to read a binary file and the Matlab coding is:
a = uint8(fread(fid,'ubit1')');
This is inefficient so I added a line below:
a = uint16(swapbytes(a));
But it doesn't help. Any other method to improve the bit reading process in Matlab?
  14 个评论
Walter Roberson
Walter Roberson 2019-9-12
编辑:Walter Roberson 2019-9-12
Yes, you can use gpu array. However it will slow down your code.
Star Rats
Star Rats 2020-7-18
Thanks @Walter for your help. You are definitely a Matlab magician!

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by