Matlab Guide Table. Need Help. Thanks

Hi everyone! I am working on a project where I will be using Matlab GUIDE/GUI. What I want to happen actually focuses on a component in GUIDE called the Table.
Here's how I want the program to work: The table in GUIDE (let's say m by n) is initially empty(no values). When the program is executed/ran, I want to input the given to the cells of the table (Not all cells are occupied there are still some cells empty). As I click a button perhaps, there will be calculations being processed and then I want the results (many of them) to come out of the empty cells in the table. So if you look at the table, all cells are now occupied (consisting of the given and the results). Thus, the table is completed.
Now, my problems are: 1. I do not know how to set-up the table such that I can input values when the program is executed. 2. What code should I use to "get" the inputted given values so that I can perform calculations? 3. What code should I use to "show" the results from the calculation to the vacant cells of the table.
Please help me in this. Better yet, may I ask for links which is related to my concern. Thank you very much.
PS: My program is a Load Flow Analyzer specifically on Gauss Seidel Method. Thank you! :)

답변 (2개)

Leah
Leah 2012년 9월 7일

0 개 추천

You might want to start here.
If you are familiar with handles in matlab that is similar to how you update data in GUI components.

댓글 수: 1

Melvin
Melvin 2012년 9월 7일
Hi Leah, Thanks for the reply. This is not actually my first time doing GUI's in Matlab. I am familiar especially on programming involving edit text, static text, push buttons. But I just don't know how to use the table/uitable.

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

Image Analyst
Image Analyst 2012년 9월 7일
편집: Image Analyst 2012년 9월 7일

0 개 추천

Melvin, you just set up an array to hold your numbers, then set the 'data' property of the table:
tableData = rand(2,2);
set(handles.uitable1, 'data', tableData);

댓글 수: 4

Melvin
Melvin 2012년 9월 7일
Hi Image Analyst, Thanks for the reply. I tried setting up my table in GUI. When I executed/ran the program, it seems that I cannot input values into the cell. How can I input values rather? First step in my program is actually to input values to some of the cells, then the output values will complete the cells of the table. Thank you :)
Le Huy
Le Huy 2014년 4월 10일
편집: Le Huy 2014년 4월 10일
hello every body! I got the same problem with Melvin that is: I want to set my results those have an unfixed size of array to the UITABLE on my GUI! so how can I do it?And how is the code to use with this situation? sincerely!
Image Analyst
Image Analyst 2014년 4월 11일
I don't understand the grammar of this "I want to set my results those have an unfixed size of array to the UITABLE on my GUI!" Perhaps get another English speaker to proofread it.
Le Huy
Le Huy 2014년 4월 11일
Hi Image Analyst, thanks for the reply. I'm sorry for confusing you! now i can solve my problem. If I get another problem, I will show it here and we can discuss about it. sinecerely!

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

카테고리

도움말 센터File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

질문:

2012년 9월 7일

댓글:

2014년 4월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by