How to improve performance with mat2cell?

3 ビュー (過去 30 日間)
Varshini Guddanti
Varshini Guddanti 2016 年 7 月 11 日
コメント済み: Stephen23 2016 年 7 月 11 日
Hi All,
My Code currently is taking one hour to get executed. When I calculated time and checked with profiler, it showed that 3918.994 seconds time is taken for doing mat2cell operation on 215 3D images in a loop. Below given is my mat2cell conversion in which I need to divide each 3D figure into cubes of 13x13x2
mat2cell(ThreeDimFigure,[13*ones(1, floor(size(ThreeDimFigure,1)/13)), mod(size(ThreeDimFigure,1), 13)],[13*ones(1, floor(size(ThreeDimFigure,2)/13)), mod(size(ThreeDimFigure,2), 13)], [2*ones(1, floor(size(ThreeDimFigure,3)/2)), mod(size(ThreeDimFigure,3), 2)]);
Can anyone help me out??
  1 件のコメント
Stephen23
Stephen23 2016 年 7 月 11 日
Simplest solution: don't convert to a cell array. It may be quite possible to simply use indexing for whatever processing your are doing.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by