フィルターのクリア

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

2 ビュー (過去 30 日間)
kumar panduga
kumar panduga 2016 年 4 月 30 日
回答済み: Azzi Abdelmalek 2016 年 4 月 30 日
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?

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 4 月 30 日
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)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by