How to do do element wise operation in cell array?

I have a cell which consists of a set of arrays further having a set of elements in each of these arrays. Suppose this cell array is of form (nfiles,1) where nfiles are the arrays as mentioned above, and I want to modify this cell by dividing each of the element of this cell by some number, what instruction will serve my purpose?

回答 (1 件)

Matt J
Matt J 2016 年 5 月 11 日
編集済み: Matt J 2016 年 5 月 11 日

0 投票

The fact that you are using cell arrays implies that you do not care about speed, so a simple for-loop will suffice. You could also use cellfun().

カテゴリ

ヘルプ センター および File ExchangeMathematics and Optimization についてさらに検索

タグ

質問済み:

2016 年 5 月 11 日

編集済み:

2016 年 5 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by