How to improve bit reading process in Matlab?

2 vues (au cours des 30 derniers jours)
Star Rats
Star Rats le 6 Sep 2019
Commenté : Star Rats le 18 Juil 2020
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 commentaires
Walter Roberson
Walter Roberson le 12 Sep 2019
Modifié(e) : Walter Roberson le 12 Sep 2019
Yes, you can use gpu array. However it will slow down your code.
Star Rats
Star Rats le 18 Juil 2020
Thanks @Walter for your help. You are definitely a Matlab magician!

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by