Azzera filtri
Azzera filtri

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

2 visualizzazioni (ultimi 30 giorni)
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?

Risposte (1)

Azzi Abdelmalek
Azzi Abdelmalek il 30 Apr 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)

Categorie

Scopri di più su Matrices and Arrays in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by