how to display a matrix in a GUI

hello everyone; please would anyone tell me how to display a matrix in a GUI ; i already tried many methods but it didn't work for me . it's actually a matrix containing MFCCs and i want to display those coefficients in my interface that i already created .

2 Comments

Please explain any details. Show us the code and tell us the problems. Then specify, how you want the data to be displayed: as text or diagram? As surface plot or uitable?
okay here is the code :
mfcc=mfcc_13_calc(wave);
f=figure('Name','interface');
t = uitable(interface,'Data',mfcc);
this is the code of a push button callback function , i tried to program it so that i can display my matrix "mfcc" in my interface that already contains other plots related to speech recognition.
the problem is whenever i run my program and click on that pushbutton ,i get the matrix but not in my interface but in an other figure . and yes i want my matrix to be displayed as a uitable .

Sign in to comment.

Answers (1)

mfcc = mfcc_13_calc(wave);
f = figure('Name','interface');
t = uitable('Parent', f, 'Data', mfcc);

4 Comments

i already tried this alternative and it doesn't work ,my matrix is displayed indeed,but in a completely different figure and not in the one i made. here is a capture of my interface ,i want my matrix to be displayed right under the blue pushbutton "analyse MFCC".
Where I wrote
t = uitable('Parent', f, 'Data', mfcc);
instead of f, pass in the figure handle of the figure you want the table to be displayed in. Make sure you set a Position for the uitable.
unfortunately ,it didn't work :/ . i am still gettng two different figures. thank you anyway :)
Your f=figure() line is asking for a new figure to be created. I do not know why you are using that call.

Sign in to comment.

Asked:

on 8 Apr 2017

Commented:

on 9 Apr 2017

Community Treasure Hunt

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

Start Hunting!