Home / Expert Answers / Computer Science / matlab-activity-with-if-else-and-character-arrays-code-has-aiready-been-provided-that-defines-a-fun-pa208

(Solved): Matlab activity with if-else and character arrays Code has aiready been provided that defines a fun ...




Matlab activity with if-else and character arrays
Code has aiready been provided that defines a function named assignorade th
function grade - assignsrade(score)
*tnter the commansts for your function here.
Code to call your function \( \theta \)
C Resen
13 else
14
15
15 end end
Q is the value assigned to grade correct for the example score of 75? (Pretest)
Output argument grade (and possibly others)
Test Code:
is the value assigned to grade correct tor a score of \( 8 r \) ?
Is the value assigned to grade correct for a score of 70 ?
Is the value assigned to grade correct for a score of 45 ?
Is the value assigned to grade correct for an unknown randomly gen
Matlab activity with if-else and character arrays Code has aiready been provided that defines a function named assignorade that accopts an input variable score that is a scalarand retums an output variable grade. Add commands to determine the cortesponding letter grade according to the following grading scale - Soore values ranging from 00 to 100 recelve an . - Score values ranging from 80 bo recelie a - Soore values ranging from 70 to 70 recelve a C. - Score values ranging from 60 to 60 recelve a D. - Score values ranging from 0 so 59 recelve an . Assign the appropriate lether grade to the character vector oitput variable grade. Use an if-elseif-else structure in your solution. Note the varlable score is deflned as an input to the function. Do not overwste its value in your cose. Be sure to assign the appropriale character to the output variable grade function grade - assignsrade(score) *tnter the commansts for your function here. Code to call your function C Resen 13 else 14 15 15 end end Q is the value assigned to grade correct for the example score of 75? (Pretest) Output argument "grade" (and possibly others) not assigned a value in the expcution with "assignGrade" function. Error in Test1 (ine 3) grade = assignGrade(score): Test Code: is the value assigned to grade correct tor a score of ? Is the value assigned to grade correct for a score of 70 ? Is the value assigned to grade correct for a score of 69 ? Is the value assigned to grade correct for a score of 45 ? Is the value assigned to grade correct for an unknown randomly generated score? (2. Are the if, eiseif, and eise keywords present in your solution? (Pretest) Is the value assigned to grade correct for a score of 45 ? Is the value assigned to grade correct for an unknown randomly generated score? (8) Are the if, elseif, and else keywords present in your solution? (Pretest) The submission must contain the following tunetions or keywords: it, else, elseif Revew this documentstion page (ii, elseif, eise) for moce informaton about writing condtional statersents.


We have an Answer from Expert

View Expert Answer

Expert Answer


We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe