Question: No Iterations or Conditionals or find() function MATLAB Function Name: percentages Input: 1. (char) A string of any length containing only lowercase 'r's, ' g

No Iterations or Conditionals or find() function MATLAB

No Iterations or Conditionals or find() function MATLAB Function Name: percentages Input:

Function Name: percentages Input: 1. (char) A string of any length containing only lowercase 'r's, ' g 's or 'b's Output: 1. (double) The percentage of ' r 's in the input string 2. (double) The percentage of ' g 's in the input string 3. (double) The percentage of ' b 's in the input string Note: - The find() function is banned - Round percentages to two decimal places Examples: [pr1,pg1,pb1]= percentages (rgb) pr1=33.3300 pg1=33.3300 pb1=33.3300 [pr22,pg2,pb2]= percentages('rgrgr') pr2=60 pg2=40 pb2=0

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 Databases Questions!