Stellar motion part 2, task 5

27 views (last 30 days)
Lorena
Lorena on 1 Jun 2023
Commented: Petra on 9 Apr 2024 at 16:00
I'm doing the 5th task of Stellar motion part 2 and I keep getting it marked as wrong.
The solution to the task is
legend(starnames)
and even though I've tried a million ways of reentering it (restarting the task, writing it manually, copying and pasting the solution code), I keep getting a message telling me that "'legend' appears to be both a function and a variable". I can't keep going with the intro if this isn't accepted. Help :(

Answers (1)

Cris LaPierre
Cris LaPierre on 1 Jun 2023
Edited: Cris LaPierre on 1 Jun 2023
It appears at some point you created a variable named legend, which has overwritten the legend function.
Try adding clear legend before you use legend(starnames)
  2 Comments
Roni
Roni on 12 Aug 2023
thank you very much
Petra
Petra on 9 Apr 2024 at 16:00
Same, thanks Chris

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!