Question: For this problem, your task is to determine if the game has ended. You will determine this by evaluating if a given correct value (

For this problem, your task is to determine if the game has ended. You will determine this by evaluating if a given correctvalue (obtained from problem 2) is equal to the current sequence length. The current sequence length is represented by the variable nin this problem. These are both scalar values.
If the correctvalue is equal to the nvalue, increment the nvalue (add one to it) and output the text "WELL DONE!". This text must be shown starting at position (1.35,2.25)and must be shown with a font size of 36. Assign this to the variable message_text.
If the correct value is NOTequal to the nvalue, do NOTincrement the nvalue and output the text "INCORRECT!". This text must be shown starting at position (1.28,2.25)and must be shown with a font size of 36. Assign this to the variable message_text.
Use the provided correctand nvariables to complete this task.
Please note the following:
There are 10 different Figures being shown here only for testing purposes. You will only have one figure in the team code submission.
This may take a little to produce the answer, as it has to produce multiple figures.
The warning text: "The number of figures may have exceeded the application limit of 10. One or more figures may not be displayed." is normal and expected here, please ignore this. for test =1:10% this is just for me to test your code - you will not use this in your team code
% This code below creates the figure for you
figure('Name','Matlab Memory Match')
X =[123; 123; 123];
Y = X';
mymap =[100; 010; 001; 110; 000];
C =[345; 125; 555];
pcolor(X,Y,C);
colormap(mymap)
set(gca,'XTick',[], 'YTick', [])
% The code above this line creates the figure for you
n = randi(7)+2;
no = n; % this saves the value for testing
correct = randi(n-2)+2;
% Please type your code below this line
% Please type your code above this line
n_vec(test)= n; % this is just for my testing in Matlab Grader
end % this is the end of my testing for loop - do not type any code below this line

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!