Simple Error Minimization Write a function that divides two numbers by one another. If the caluclated value is greater t
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Simple Error Minimization Write a function that divides two numbers by one another. If the caluclated value is greater t
Simple Error Minimization Write a function that divides two numbers by one another. If the caluclated value is greater than or equal to 1, double the second value (denominator) and recalcuate. Determine the number of times is takes to get a result that is less than one. The function should have two inputs and two outputs as defined below. inputs: 1. Number 1 2. Number 2 Outputs 1. Final Value of Number 1 divided by Number 2 2. The number of iterations it took for final value to be less than 1 The function header should be formatted similarly to the following: function [out1, out2] = Compare2Nums (in1, in2) Remember you are free to use whatever variable names you want, but they must be listed in the same order as given in the input/output lists provided above.