Question: Code language is MATLAB. Question 3: Sum the digits of a given number. Ask user to input a number and find the summation of the

Code language is MATLAB.
Question 3: Sum the digits of a given number. Ask user to input a number and find the summation of the digits. Example: input: 1453 output: 13 (since 1+4+5+3=13) Hint: You can use numel(num 2str(number)) to get the number of digits in a number. Other commands that may be used in your solution: mod, floor. (15 points) Question 4: Display 5 coin flip outputs by using rand function. rand gives random values between [0,1]. You need to have output either -1 (head) or 1 (tails). Hint: rand
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
