I have a matrix (57,3600,45), how can I create matrices with (3600,45)?
1 view (last 30 days)
Show older comments
i have some testing data (57 test) compile into a matrix (57,3600,45) with 45 different column and 3600 rows of data.
i would like to look independenly different test into plots. i wouls like to get matrices shape to (3600,45)
thank you for any help
0 Comments
Answers (3)
James Tursa
on 15 Feb 2019
Is this what you want?
k = some integer index
squeeze(your_matrix(k,:,:))
0 Comments
Kevin Phung
on 15 Feb 2019
does this give you what you want?
test_num = 1;
M(test_num,:,:) %where M= your matrix
0 Comments
dpb
on 15 Feb 2019
Why did you store data in such a permuted order?
However, not to fear, MATLAB can fix your problem!
data=permute(data,[2 3 1]); % rearrange to place 2D arrays by plane
Now you can iterate over the 57 planes and retrieve each test set as
tst=data(:,:,i);
and process each as desired.
2 Comments
dpb
on 19 Feb 2019
JM Answer moved to comment...dpb
Thank you for all the answer...
I only get a matrix where all the (3600,54) are 1
i stored the data in this way becouse it would make simplier to add more test and how to look the data... at least in my mind...
Thank you,
dpb
on 19 Feb 2019
Well, presuming all you did was the permute operation, then that's what the data in the array are...all permute does is change the order of the indices
You could make life much easier for yourself if you would store the data in 3D array by plane for each test initially. If it (the test data) are a 2D array for each test, then treating each test as a layer in a stack would seem the easiest by far both to look at and to process.
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!