Instructions: 1. Solve the following problems in a MATLAB script. You will be allowed to submit...

80.2K

Verified Solution

Question

Electrical Engineering

Instructions: 1. Solve the following problems in a MATLABscript. You will be allowed to submit only one script, please workall the problems in the same script (Hint: careful with variablesnames) 2. Show your work and make comments in the same script (Use%). Please write your name in the first line of the scrip with % 3.It is OK to work with other students, but what you submit should beyour own work – not something copied from someone else.

Problem #1 (10 points): Using loops show the followingcalculation: ? ???? 25 3 ????=1

Problem #2 (15 points): When working with computer,microprocessors or digital systems most of the commands arerepresented in binary numbers, hexadecimal numbers, ASCII or octal.We want to write a code that do the following a. Inputs are decimaldigits from 200 to 400 counting by 10 b. When the counter find anumber smaller than 300 the result will be the same numberconverted into hexadecimal c. When the counter find 300 display “Weare at 300 from now on the numbers will be display as binarynumbers” d. When the counter find an number bigger than 300 theresult will be the same number converted into binary

Problem #3 (25 points): As you make decisions over your 401K,you find one investment opportunity that will draw 09% interest peryear added to your account. The trick about this investment is thatyou will need to cancel the investment as soon as you double theamount of money you put in the first time which could be any amountfrom $5000 - $7000. You will received statements of the balancedfor the total years you invested until the balanced is doubled.Expected from this program: • Initialize balance, year, andinterest rate. Your first year is denominated at year 0. • You willneed to display the balance with headings “Year” and “Balance”until the balance is twice the original. • Please display thenumbers with bank format Example: Initial Balance=4500.00 YearBalance 1.00 4905.00 2.00 5346.45 3.00 5827.63 4.00 6352.12 5.006923.81 6.00 7546.95 7.00 8226.18 8.00 8966.53 9.00 9773.52

Problem #4 (35 points): A friend ask you to babysit their 5 yearold named Kylo-Ren. After the kid tablet run out of battery and isalmost at the point to start screaming, you decide to play a game.Since you are an expert in MATLAB or at least love writing someeasy scripts, you decide to work a game for him. You want MATLAB togenerate a random integer number that KyloRen will guess. Expectedfrom this program: • Generate a random integer (no higher than 25).Keep in mind that a 5 year old will probably do not want to play agame if it is too long or too short. • Ask the user to input aguess. Please specify how high the guess could be. • Check theguess given for the user. If the guess is too low tell the user:“Kylo-Ren, your guess is too low, please try again and enter a newguess number”. The same thing should happen if the guess is toohigh. • When the guess is equal to the random number pleasecongratulate Kylo-Ren. • If you can add sounds to the game,Kylo-Ren will be more eager to play over and over again which willgive you time to watch one episode of the Big Bang Theory. Plus youcan get bonus points. Example: Please enter your guess between 1and 20: 5 Sorry your guess is too low Please enter your next guess:15 Sorry your guess is too high Please enter your next guess: 5Sorry your guess is too low Please enter your next guess: 10 Sorryyour guess is too low Please enter your next guess: 12 Sorry yourguess is too low Please enter your next guess: 14 Sorry your guessis too high Please enter your next guess: 13 At last! :)

Problem #5 (15 points): You all know I like sports, especiallybaseball. What is your favorite sport? Expected from this program:• Show the options in a menu form for the user for them to presseither Baseball, Football, Soccer, Track and Field, Other, and QuitSurvey. • When display a fun fact for each sport as follows oBaseball - display “Bobby Richardson is the only player to win anMVP on the World Series losing team” o Football – display “It takes600 cows to make one full season’s worth of NFL footballs” oBasketball – display “ Basketball was invented by a YMCA teacher inSpringfield, MA” o Soccer – display “FC Barcelona wears UNICEF logoin their shirt while donating 1.5M euros each year – Reversesponsorship” o Track and Field – display “UNC Charlotte Men T&FTeam Won C-USA Championship this year” o Other – display “ Golf:The average golf ball has 336 dimples, Tennis: Tennis balls wherechange from white to yellow in 1972” o Quit Survey – display“Thanks for participate” Example: Panther: Keep Pounding Broncosare my option Thanks for participate

Problem #6 (20 points): We have set up a limit in current on apiece of equipment to be 0.45 Amps. When the system is running datais gather in the DAQ. The system generates a vector of 10 randomnumbers in one single column. The control system is comparing ifthe values of the result currents are higher than the limit set forthe supplier. We need to project the results into a monitor foreasy understanding and to take action over the equipment. If one ofthe parameters in the vector has a value higher than the limit, wewill need to display a message that say “There is at least onecurrent value measure above the limit”, if this is not true, pleasedisplay “All values are below the limit. You can proceed with yourdata acquisition”.

Answer & Explanation Solved by verified expert
4.2 Ratings (815 Votes)
for x20010400 if x5 if yx dispyour guess is too high try again elseif y m61 y C8 y D2 y DC y E6 y F0 y FA y 104 y 10E y 118 y 122    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students