Display table with numbers and text as uitable

If I have a simple matlab table, with some columns containing numbers(double) and other columns contain text(cell), how can I display it as uitable? E.g. the matlab table may read like:
Names Ages
John 12
Mike 10
Peter 15

 채택된 답변

Image Analyst
Image Analyst 2019년 3월 18일

0 개 추천

Try this:
handles.uitable1.Data = table2cell(t);
where t is your table, and the uitable is a GUIDE control. If you're not using GUIDE, then just use
uitableHandle.Data = table2cell(t);

댓글 수: 1

danel
danel 2019년 3월 18일
Thank you! I need to learn more about how to use handles and display the uitable but the conversion to cell suggestion gives me a way to show the uitable using my limited knowledge.

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

추가 답변 (0개)

카테고리

태그

질문:

2019년 3월 18일

댓글:

2019년 3월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by