MATLAB: Display values from matfile

matfile

I have a mat file with 4 variables, each variable contains 1 row and 3 column values…. i wanted to display these values of all variables in a table format that is one table with 4 rows and 3 columns with headings…. please cud someone help me….

Best Answer

v1=rand(1,3);
v2=rand(1,3);
v3=rand(1,3);
v4=rand(1,3);
f = figure('Position',[100 100 400 150]);
dat = [v1; v2;v3;v4];
t = uitable('Units','normalized','Position', [0.1 0.1 0.9 0.9], 'Data', dat, 'RowName',{'v1','v2','v3','v4'})