Hi, i have pk=1x6 cell,each cell contains 192x192 data, i need to divide each 192x192 data into 3x3,then perfrom "AND",i.e result=64x64x6

1 回表示 (過去 30 日間)
plz check whether my code is correct
fun=@(block_struct) sum(block_struct.data);
for ol=1:length(pk)
result(:,:,ol)=blockproc(pk{ol},[3 3],fun)
end

採用された回答

Walter Roberson
Walter Roberson 2016 年 11 月 22 日
fun=@(block_struct) sum(block_struct.data(:));
  4 件のコメント
kaavya subramani
kaavya subramani 2016 年 11 月 22 日
Sir, i have already stored a variable named 'result',code is working thanks a lot
kaavya subramani
kaavya subramani 2016 年 11 月 22 日
編集済み: Walter Roberson 2016 年 11 月 22 日
Sorry for asking relevant question.
My p2=1x1x6 cell, each (i.e,1x1x1 contains 6 21x21 data, likewise 1x1x2 contains 6 21x21 data and so on). now i need to perform the same blockproc for all these 21x21 data, totally 36 21x21 datas, how to do, give some idea sir

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by