Problem with table, error 'Unrecognized row name '...' '

6 ビュー (過去 30 日間)
Riccardo Zulli
Riccardo Zulli 2018 年 4 月 6 日
回答済み: Peter Perkins 2018 年 4 月 11 日
This is my code:
Fluidi={'Dowcal 20';'Dowtherm Q';'Therminol XP'};
Tempo=[length(x1);length(x2);length(x3)];
T=table(Fluidi,Tempo);
disp(T)
Matlab gives me this error: Unrecognized row name 'Dowcal 20'.
Why?
Thanks to everybody will help me

回答 (2 件)

Walter Roberson
Walter Roberson 2018 年 4 月 6 日
You are not creating named rows in your table. Named rows have to be set by the RowNames property of the table, such as
T = table(Tempo, 'RowNames', Fluidi)

Peter Perkins
Peter Perkins 2018 年 4 月 11 日
There's something you're not telling us (probably what Walter suggests):
>> Fluidi={'Dowcal 20';'Dowtherm Q';'Therminol XP'};
>> Tempo=[1;2;3];
>> T=table(Fluidi,Tempo);
>> disp(T)
Fluidi Tempo
______________ _____
'Dowcal 20' 1
'Dowtherm Q' 2
'Therminol XP' 3

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by