Effacer les filtres
Effacer les filtres

how to find number of bytes in a row of a matrix

2 vues (au cours des 30 derniers jours)
kumar panduga
kumar panduga le 30 Avr 2016
I have a matrix with 4431 rows and 102 columns. Each column is of different length(1st column is 4 bytes and precision is unsigned integer32, 2nd column is 2 bytes and precision is unsigned inter 16 etc) Total bytes in a row is 5822. how to read from a specific byte in a row?

Réponses (1)

Azzi Abdelmalek
Azzi Abdelmalek le 30 Avr 2016
Look at this example
a=num2cell(uint16(randi(4,1,4)))
b=num2cell(uint32(randi(4,1,4)))
c=[a b]
d=c(randperm(8))
% d is a cell array containing uint32 and uint16 numbers
idx=cellfun(@(x) isequal(class(x),'uint32'),d) % Find indices of uint32 numbers
out=d(idx)

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by