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?

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 14 Apr. 2020

0 Stimmen

a = (1:100);
b = (a.^2);
plot(a,b)
xlabel('time')
ylabel('fish')

2 Kommentare

Before that,
clear xlabel ylabel
just in case you still have the variables xlabel and ylabel stuck in your workspace.
Holden Earl
Holden Earl am 14 Apr. 2020
Got it now, thanks!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by