Page 1 of 1

Question 23 (a) Write a MATLAB script that will collect users' feedback. The feedback is a grading of 1 to 5, so you nee

Posted: Sun Jul 03, 2022 9:59 am
by answerhappygod
Question 23 A Write A Matlab Script That Will Collect Users Feedback The Feedback Is A Grading Of 1 To 5 So You Nee 1
Question 23 A Write A Matlab Script That Will Collect Users Feedback The Feedback Is A Grading Of 1 To 5 So You Nee 1 (272.45 KiB) Viewed 25 times
Question 23 (a) Write a MATLAB script that will collect users' feedback. The feedback is a grading of 1 to 5, so you need to validate this. The collection of feedback will continue until the user enter 'Bye'. You are required to displace the number of feedback and the average grading of the feedback at the end. Note that you are required to handle any divide by zero condition. Following is the illustration of what you program should do. [12 Marks] Feedback Please enter feedback Grade 1-5 or Bye to end> 5 grade 5 Please enter feedback Grade 1-5 or Bye to end> 6 grade 6 Invalid Entry Please enter feedback Grade 1-5 or Bye to end> 4. grade = 4 Please enter feedback Grade 1-5 or Bye to end> 4 grade = 4 Please enter feedback Grade 1-5 or Bye to end> 3 grade = 3 Please enter feedback Grade 1-5 or Bye to end> 2 grade = 2 Please enter feedback Grade 1-5 or Bye to end> Bye 5 4 4 3 2 Nos of feedback =5 The average feedback is 3.600000 (b) Given 110110101101 in a 12-bit register, express this in denary if it is stored using TWO's complement method. [4 marks] (c) Plot y=sin x, 0≤x≤2π, taking 100 linearly spaced points in the given interval. Label the axes and put 'Plot created by yourname' in the title. [4 marks]