I have a structure (K) with many fields, containg a field (elevation) which is (161*1 cell) array, each cell is a matrix (n*1) double.
I wanted to find all the elements in each matrix that is more than 0 then calculate the area of these values (above 0)
firstly I made a new cell array of the indexs that I needed
idx = arrayfun(@(K) K.elevation >=0, K, 'UniformOutput', false)';
now I want to use the function trapz to find the area
I tried many things, but I'm getting always errors like 'Unable to use a value of type cell as an index or 'Expected one output from a curly brace or dot indexing expression, but there were 161 results'
Can someone help me with this issue?