I have a 3D matrix in MATLAB. It has 3 rows, 4 columns and 2 time frames. Please see the dataset:
>> size(filtered_data)
ans =
3 4 2
>> filtered_data
filtered_data(:,:,1) =
15 22 19 16
15 15 13 17
19 20 17 17
filtered_data(:,:,2) =
14 17 14 10
18 19 11 18
16 15 14 17
I want to store all values of this 3D matrix with their indices into a 2 dimension variable.
This will look something like this
I tried using the find()
function, but it returns multiple indices and it requires you to enter a value for which you need to calculate the indices.
Is there a predefined MATLAB function for this problem?
I will appreciate any help.