필터 지우기
필터 지우기

How to do do element wise operation in cell array?

조회 수: 7 (최근 30일)
Shraddha Joshi
Shraddha Joshi 2016년 5월 11일
편집: Matt J 2016년 5월 11일
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일
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().

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by