Info

This question is closed. Reopen it to edit or answer.

Arrange the numbers of a parent array into its two child arrays, the array is inside a cell

1 view (last 30 days)
This function gives a 3x2 cell of random numbers
function Out = MyOutCreator
Out = {rand(5, 3), rand(5, 2); rand(2, 5), rand(5, 3); ...
rand(2, 3), rand(3, 6)};
end
And this function finds out the numbers that are greater than 0.5 from all cells
function MyCounter
Out = MyOutCreator;
OutG = cell(1, numel(Out));
for iOut = 1:numel(Out)
M = Out{iOut};
OutG{iOut} = M(M > 0.5);
end
I want to save the result of this function in the previous function's result (cell), but with some changes. And the changes are: All the number in arrays of cell should be placed in two more arrays, one with numbers greater than 0.5 and the other with numbers less than 0.5. Can someone please help me with this?

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!