Make title of figure to be displayed in a line

8 ビュー (過去 30 日間)
Lily
Lily 2015 年 5 月 6 日
コメント済み: Lily 2015 年 5 月 6 日
I have this for the title:
T=290;
PL=101.235e3;
n1=5e3;
figure;
title({'B vs. r @ T [C] =',num2str(T-273.15),'and PL [atm]= ',num2str(PL/101.325e3),' n1 = ',num2str(n1)});
When run this the title is shown in couple of lines, how can I make it in 1 line?

採用された回答

the cyclist
the cyclist 2015 年 5 月 6 日
編集済み: the cyclist 2015 年 5 月 6 日
Do this instead:
title(['B vs. r @ T [C] =',num2str(T-273.15),'and PL [atm]= ',num2str(PL/101.325e3),' n1 = ',num2str(n1)]);
Notice that I changed the curly brackets to square brackets. The effect of this is to create one long string of characters, instead of a cell array with multiple elements.
  1 件のコメント
Lily
Lily 2015 年 5 月 6 日
Great. Thanks a lot. I an new to Matlab and this really helps. Thanks

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeArray Geometries and Analysis についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by