I am unable to label the y axis of a graph.

3 vues (au cours des 30 derniers jours)
SAFWAN
SAFWAN le 7 Nov 2022
I have been trying to label the axis of a graph that I was plotting.
My code:
A = xlsread("GM_Time_History.xlsx");
x = A(:,1);
y = A(:,2);
i = (pi/2*9.81).*cumtrapz(y.^2);
figure;
plot(x,i);
xlabel('Time(sec)')
ilabel('AI')
The output graph only has the x axis labelled.
The error I am seeing is:
Unrecognized function or variable 'ilabel'.
Error in AriasIntensity (line 9)
ilabel('AI')

Réponse acceptée

Cris LaPierre
Cris LaPierre le 7 Nov 2022
MATLAB does not contain an ilabel function. It looks like you want to use ylabel instead.
A = xlsread("GM_Time_History.xlsx");
x = A(:,1);
y = A(:,2);
i = (pi/2*9.81).*cumtrapz(y.^2);
figure;
plot(x,i);
xlabel('Time(sec)')
ylabel('AI')

Plus de réponses (0)

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by