Help Please : 3 for loops && 3 Dimensional Matrix want them in a 2D GUI Table
조회 수: 1 (최근 30일)
이전 댓글 표시
it is my first question here and i am not a proffisional in matlab but this problem made me crazy Objective: is that i want to output PD(i1,j1,k1)"which is a 3D Matrix" in a 2D GUI Table as i1 j1 k1 changes every loop i am using this function "set(handles.table,'Data']); but i dont know what to define !! 1-i am making 3 for loops in each other
for i1=1:11
statments
for j1=1:18
for k1=1:24
PD(i1,j1,k1)=
PPRL(i1,j1,k1)=
end
end
end
Thanks in Advance
댓글 수: 2
채택된 답변
Thorsten
2013년 2월 7일
You can extract a 2D matrix A out of a 3D matrix PD using
A = PD(:, :, 1);
or
A = squeeze(PD(i, :, :))
or
A = squeeze(PD(:, i, :))
Depending on which dimension your outer loop runs that changes i.
In your case you could use
for i1=1:11
A = squeeze(PD(i, :, :));
end
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!