MATLAB Fundamentals course problem
이전 댓글 표시
Hi, I have a problem in this course in this part: "5.11 Reshaping Arrays: (7/8) Overall Average Electricity Revenue" for task 1. I receive an error message even if my answer is correct. It doesn't find the variable named avgRev. Can anyone help me? Thanks, Nicholas
댓글 수: 2
Image Analyst
2017년 11월 11일
Probably . . . if you give us your code!
Chaitanya Chitale
2017년 11월 16일
This issue is now fixed.
채택된 답변
추가 답변 (3개)
Jan
2017년 11월 11일
Can anyone help me?
Yes. Or no. It depends on what kind of help you want.
The error message is clear already: It is tried to use the variable "avgRev", but it has not been created before. The message contains the line, where the code fails. Open it in the editor and find out, where you have to provide this variable or where to create it. Perhaps it is a typo only.
For a more specific help, we need the (relevant part of the) code, the complete error message and the code you use for calling this function (or do you use the "Run" icon in the editor?).
댓글 수: 7
Nicholas Caputo
2017년 11월 12일
Jan
2017년 11월 12일
From your question:
I receive an error message even if my answer is correct
From your comment:
It doesn't give me an error message.
This is a confusing combination. What does this sentence mean exactly:
The task doen't find variable even if I Run the code and I submit it.
Which task? What does "finding a variable" mean? How do you know, that "it" does not "find a variable"? Perhaps because you get a message? If so, which one? How do you "run" which code and where do you submit what?
Sorry, I do not understand what you are trying to do and what is failing. Please provide an explanation which allows to reconsider, what you want, do and observe.
Nicholas Caputo
2017년 11월 12일
gs
2017년 11월 12일
I'm experiencing the same problem
Image Analyst
2017년 11월 12일
Looks like a bug to me. I mean how could it even give you a check mark in the second line if the first line has a red x? I'd report it to the Mathworks.
One thing to try is to call plot() in line 7 and see if that lets Task 2 be enabled.
Jan
2017년 11월 13일
isboolean is not useful here, because exist replies a double with an integer number. Try to define boolean as in a dummy in the code:
boolean = @(x) x
I've encountered a similar bug in part: "6.1 Project - Halfway Review of Fundamentals: (2/3) Women's 200m Backstroke". I attach the code of the test suite details:
t1__ = (boolean(exist('name')))
t2__ = (boolean(exist('country')))
t3__ = (boolean(exist('time')))
assert(t1__ && t2__ && t3__)
Walter Roberson
2017년 11월 13일
편집: Walter Roberson
2017년 11월 13일
0 개 추천
In another related Question, Mathworks said it is a bug that they will repair ASAP.
Unfortunately I cannot find that question now to make sure they know to look at all the various chapters.
카테고리
도움말 센터 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

