Simple function on each cell of a cell array using data within the cells

I have a bunch of fatigue data listed in separate cells of a cell array (A). Each cell (40 rows, 4 columns) has data points (displacement, stress, strain, cycle number) for 1 cycle. For each cell in the array (ie each cycle), I need to perform a simple function (max(strain)/max(stress)). I have been playing with cellfun but have not had any luck.
I don't have a ton of Matlab experience, so hopefully this is a simple problem!

 채택된 답변

John D'Errico
John D'Errico 2017년 2월 10일
편집: James Tursa 2017년 2월 10일
Why did cellfun not work? Why would this not do what you have asked?
fun = @(X) max(X(:,3))/max(X(:,2));
cellfun(fun,A)
Do you have multiple cycles in each cell? Your question is ambiguous in that respect.

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Data Types에 대해 자세히 알아보기

태그

질문:

2017년 2월 10일

편집:

2017년 2월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by