Why is it showing “Incorrect” for a Task in “Create Animated Plots with MATLAB” course?
I was doing this task in the new "Create Animated Plots with MATLAB" course. But whenever I ran the code, it showed Incorrect. On closer inspection, I saw that when I ran it manually, the animation ran till x = 7.1 but when the code is executed on clicking "Submit", the animation runs till x is a little less than 7. Why is this happening and how can I complete this task?
Code:
for idx = 1:numel(y)
scatter(x(idx),y(idx),40,’filled’)
drawnow
end
Screenshot:I was doing this task in the new "Create Animated Plots with MATLAB" course. But whenever I ran the code, it showed Incorrect. On closer inspection, I saw that when I ran it manually, the animation ran till x = 7.1 but when the code is executed on clicking "Submit", the animation runs till x is a little less than 7. Why is this happening and how can I complete this task?
Code:
for idx = 1:numel(y)
scatter(x(idx),y(idx),40,’filled’)
drawnow
end
Screenshot: I was doing this task in the new "Create Animated Plots with MATLAB" course. But whenever I ran the code, it showed Incorrect. On closer inspection, I saw that when I ran it manually, the animation ran till x = 7.1 but when the code is executed on clicking "Submit", the animation runs till x is a little less than 7. Why is this happening and how can I complete this task?
Code:
for idx = 1:numel(y)
scatter(x(idx),y(idx),40,’filled’)
drawnow
end
Screenshot: animation, plot, drawnow, self-paced online courses MATLAB Answers — New Questions









