The provided solution is coming up as incorrect.
15 次查看(过去 30 天)
显示 更早的评论
I am currently doing the MATLAB onramp course and I am on task 6 of the final project Stellar moon 2 and I cant figure out the answer. When I select the solution I copied it and put it as my answer however it comes up as incorrect. This is beyond frusterating as I am unable to progress and I have tried deleting everything and trying again several times and I just want to finish this course. Can someone please help.
0 个评论
回答(1 个)
Swaroopa
2022-8-28
Hi Owen,
You have to create the same variable name "movaway" and please check whether you have given correct variable name.
In the task,starnames is a 7*1 string and speed is the corresponding speed for the stars which is an integer array.
From the question ,we should give output elements in starnames whose speed is greater than zero and should store the output in movaway variable.
So we can write code in the following way
movaway=starnames(speed>0)
Hope it helps.
2 个评论
Richard Austin-Berry
2022-12-14
编辑:Richard Austin-Berry
2022-12-14
I think it's maybe because 'legend' existed in the code both as a matrix and a function. I had to close the tutorial and reopen it, then interrogate what's in the code and legend only existed as a function. Then it worked fine.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Legend 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!