xlabel and ylabel errors
Ältere Kommentare anzeigen
I have the following code:
x = linspace(-2*pi,2*pi,100);
y1 = sin(x);
y2 = cos(x);
figure
plot(x,y1,x,y2)
xlabel('-2\pi < x < 2\pi')
ylabel('Sine and Cosine Values')
when I run it brings the following error
Index exceeds the number of array elements. Index must not exceed 3.
Error in mfano (line 8)
ylabel('Sine and Cosine Values')
1 Kommentar
Paul Bower
am 17 Feb. 2025
Hi Winfrida, Just FYI ... I ran your code on version R2024b and it works fine.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Elementary Math finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!