Hi Mathworkers,

I am having problem in storing indices (That will serve as necessary data in my purpose)of for loops in a cell array after satisfying a condition. Here, there is a draft of the code.

for i=8:110

for j=34:110

for k=95:110

EE=myfunction(i,j,k); %% Function may be any

if EE<=5

(#######)

end

end

end

end

#### at this point, I need the cell array which stores the indices i,j,k for whom the condition (EE<=5) is satisfied.

output may be something like this,

9,50,99

9,61,103

……….

10,34,96

10,35,95 etc..

## Best Answer