matlab中title引入變量 [轉載]

原文鏈接:http://imvlzn.blog.163.com/blog/static/17467327201519104927742/

 

 

 

1. 三行標題

a= 1; b= 2; c = 3; d= 4;

title( { 'Plot', ['a = ', num2str(a), 'b = ',num2str(b)], ['c = ', num2str(c),',d = ',...

num2str(d) ] } )

Notice:有兩點,一是title中引入中括號[ ],每對中括號表示一行;二是多行[ ]用{ }括起來

2.兩行標題

a = 1; b = 2; c = 3; d =4;

title( { 'Plot', ['a = ', num2str(a), ',b = ',num2str(b), ...

          ',c = ', num2str(c),', d= ',num2str(d) ] } )

**********************************************************

xlabel,ylabel,text,legend等中此用法類似

**********************************************************

#end

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章