How to: taking out 2d matrix from 3d matrix
Show older comments
Hello All, I need help in 3d matrix. I have z as 2x20x30 matrix which I will represnt here as:
z(i,m,n)
Now I want to take out z1 as (m,n) and z2 as (m,n) matrix from this. Meaning the i from z(i,m,n) is i=1:2. So z1 will be (m,n) when i=1 and z2 will be (m,n) when i=2
What I did is:
z1(m,n)=z(1,m,n)
z2(m,n)=z(2,m,n)
But this yields only 1 value and rest of z1 matrix values turns out as zero.
I am not sure how to pull this out. Can anyone help me? I hope you understand my problem. Regards, Adwait
Accepted Answer
More Answers (1)
Categories
Find more on Univariate Discrete Distributions 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!