I am getting the following error

6 vues (au cours des 30 derniers jours)
Yared
Yared le 24 Oct 2025
Error in solution: Line: 55 Column: 1
Illegal use of reserved keyword "end".

Réponses (2)

Matt J
Matt J le 24 Oct 2025
Modifié(e) : Matt J le 24 Oct 2025
There are many ways to generate that error. One of them is that you may be using 'end' as the name of a variable, e.g.,
end=1
Illegal use of reserved keyword "end".

Walter Roberson
Walter Roberson le 24 Oct 2025
Most likely, you have one too many end statements
I recommend using the editor facility "Smart Indent", which I believe has shortcut alt-i (⌘-I on Mac)

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Produits


Version

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by