Setting a Variable value as Label in Plot

4 次查看(过去 30 天)
I have a variable file_name which stores the name of the file eg.
file_name=Strain;
now i want to plot a graph having Strain on the X-axis , actually this will be a repetitive procedure and i will be getting new string(values) in the variable file_name each time and will be using them to plot new graph , how can i do this.
Regards, Amit
  1 个评论
Daniel Shub
Daniel Shub 2013-7-23
编辑:Daniel Shub 2013-7-23
Presumably you mean file_name='Strain'; otherwise we will need to know what Strain is.

请先登录,再进行评论。

回答(1 个)

Azzi Abdelmalek
Azzi Abdelmalek 2013-7-23
编辑:Azzi Abdelmalek 2013-7-23
xlabel(file_name)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by