I am unable to label the y axis of a graph.
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
SAFWAN
le 7 Nov 2022
Réponse apportée : Cris LaPierre
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')
0 commentaires
Réponse acceptée
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')
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Line Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!