フィルターのクリア

How can I make a subscript for a column name

9 ビュー (過去 30 日間)
Tobias Wzl
Tobias Wzl 2017 年 10 月 12 日
コメント済み: Tobias Wzl 2017 年 10 月 12 日
Hey everyone,
I'm looking for help, like I already mentioned in the title. I can't figure out how I can do a subscript for a Column name in my table. Does anyone know how to do this? I was looking desperatly for answers all over the internet, but I couldn't find anything. I just want that the'i' after my P is subscripted....
Code:
% --- FIGURE -------------------------------------
handles.figure1 = figure( ...
'Tag', 'figure1', ...
'Units', 'characters', ...
'Position', [102.8 24.2307692307692 126.8 33], ...
'Name', 'Parameter', ...
'MenuBar', 'none', ...
'NumberTitle', 'off', ...
'Color', [0.941 0.941 0.941]);
% --- UITABLE -------------------------------------
% Initialize empty string for components of the Data
Data=cell(16,6);
for i = 1:numel(Data)
Data{i} = '';
end
handles.uitable1 = uitable( ...
'Parent', handles.figure1, ...
'Tag', 'uitable1', ...
'UserData', zeros(1,0), ...
'Units', 'characters', ...
'Position', [12.2 8 114.3 21], ...
'BackgroundColor', [1 1 1;0.961 0.961 0.961], ...
'ColumnEditable', [true,true,true,true,true], ...
'ColumnFormat', {'char','char','char','char','char'}, ...
'ColumnName',{'ID','P_i Stationary[W]','P_i','<HTML>&Omega','Voltage[V]'}, ... % für griechische Buchstaben in einer Column <HTML>&Buchstabe
'ColumnWidth', {'auto','auto','auto','auto','auto'}, ...
'Data',Data); % add the "string" Data
uicontrol('Style', 'push', 'String', 'SAVE',...
'Position', [12.2 8 114.3 21])

採用された回答

Walter Roberson
Walter Roberson 2017 年 10 月 12 日
Example:
h = uitable('Data', [1 2; 3 4], 'ColumnName', {'<HTML>&Omega', '<HTML>P<SUB>i'})
  3 件のコメント
Walter Roberson
Walter Roberson 2017 年 10 月 12 日
'<HTML>P<SUB>i</SUB> transients'
Tobias Wzl
Tobias Wzl 2017 年 10 月 12 日
solved it by myself
'<html>P<sub>i</sub> -stationary[W]'

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDialog Boxes についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by