axis on plot not displaying

2 次查看(过去 30 天)
a = (1:100);
b = (a.^2);
plot(a,b)
xlabel = 'time';
ylabel = 'fish';
I have tried using "xlabel('time');" but nothing seems to work, the graph will display and no error will be shown but the labels wont come up?

采纳的回答

Walter Roberson
Walter Roberson 2020-4-14
a = (1:100);
b = (a.^2);
plot(a,b)
xlabel('time')
ylabel('fish')
  2 个评论
Walter Roberson
Walter Roberson 2020-4-14
Before that,
clear xlabel ylabel
just in case you still have the variables xlabel and ylabel stuck in your workspace.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Axis Labels 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by