Processing a 2d matrix into a 3d and can't avoid a subscripted assignment dimension mismatch.
이전 댓글 표시
Hello, I currently have a matrix of the following form
(x)(y)(z)
1 1 1
2 2 1
3 3 1
4 4 1
1 1 2
2 2 2
3 3 2...
The important part being that the third column has several entries of the same value. I was attempting to process it so that I could display all of the entries with the same value at once. My intuition was to convert the original 2-D matrix into a 3-D matrix where the third dimension was determined by the (z) value. So in my code I have the following line:
NewPC(j,:,z) = OldPC(i,:);
At this point I receive my subscripted assignment dimension mismatch. How would one recommend proceeding in order to correct this error?
댓글 수: 1
Star Strider
2014년 7월 3일
One ( at least I ) would request that you post the entire loop or nested loops encompassing that statement.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!