如何在matlab中显示表格的编程应用程序

2024-10-12 19:35:49

1、f = figure('Position', [100 100 752 250]);

如何在matlab中显示表格的编程应用程序

2、t = uitable('Parent', f, 'Position', [25 50 700 200], 'Data', magic(10))

如何在matlab中显示表格的编程应用程序

4、t.ColumnName = {'雉搽妤粲LastName', 'Age', 'Weight', 'Hei爿讥旌护ght', 'Self Assessed|Health Status'};

如何在matlab中显示表格的编程应用程序

6、t.RowName = [];

如何在matlab中显示表格的编程应用程序

8、t.BackgroundColor = [.4 .4 .4; .4 .4 .8]; t.ForegroundColor = [1 1 1];

如何在matlab中显示表格的编程应用程序

10、t.ColumnFormat = {[] [] [] [] {'Excellent', 'Fair', 'Good', 'Poor'}};

如何在matlab中显示表格的编程应用程序

11、t.CellEditCallback = 氆尧彻性@ageCheckCB;function ageCheckCB(src, eventdata)if (eventdata.Indices(2) == 2 && ... % check if column 2 (eventdata.NewData < 0 || eventdata.NewData > 120)) tableData = src.Data; tableData{eventdata.Indices(1), eventdata.Indices(2)} = eventdata.PreviousData; src.Data = tableData; % set the data back to its original value warning('Age must be between 0 and 120.') % warn the userendend

如何在matlab中显示表格的编程应用程序
猜你喜欢