필터 지우기
필터 지우기

Cell array in uitable

조회 수: 5 (최근 30일)
Lluis Roca
Lluis Roca 2013년 10월 14일
댓글: Azzi Abdelmalek 2013년 10월 14일
Hi,
I have a cell array output, Value < 10x1 cell>, were each cell in the cell array contains a matrix element < 100x2 double>. Each row inside the matrix element is a set of X and Y coordinates.
How can I store each matrix element separately in a different uitable cell?
Thank.

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 10월 14일
If a is your cell array
b=cat(2,a{:})
x=b(:,[1 3])
y=b(:,[2 4])
  댓글 수: 2
Lluis Roca
Lluis Roca 2013년 10월 14일
Thank but how do I store them in uitable?
Azzi Abdelmalek
Azzi Abdelmalek 2013년 10월 14일
a={[1 2;3 4;5 6] [1 2;3 4;5 6]*10}
b=cat(2,a{:})
x=b(:,[1 3])
y=b(:,[2 4])
f=figure
headers={'x','y'}
h = uitable(f,'Data',[x(:) y(:)], 'ColumnName',headers);

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by