Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Calculating gear ratios for an orrery An orrery is a mechanical model of the solar system. Gear ratios approximate the ratio of orbital periods for
Calculating gear ratios for an orrery An orrery is a mechanical model of the solar system. Gear ratios approximate the ratio of orbital periods for various planets and accurate ratios are necessary to build an accurate orrery. The numerator and denominator of the rational approximation corresponds to the number of teeth in the two gears that model the corresponding orbits Calculate the ratio approximation of planet1Period and planet2Period within ratio Tolerance. Assign the numerator to approxNum and denominator to approxDen. Ex: If planet1Period is 1 (orbital period of Earth in years) and planet2Period is 1.881 (orbital period of Mars in years), then approxNum is 8 and approxDen is 15 Your Function Save Reset MATLAB Documentation 1 function approxNun, approxDen] = GearRatio( planet!Period, planet2Period, ratioTolerance ) 2 % GearRat 10: Return numerator and denominator of gear ratio that 3% approximates the ratio of the inputs period!/period2 within the 4% input tolerance. 5% Inputs : planet!Period, planet2Period - input periods ratioTolerance - required accuracy of approximation 71 % 8% Outputs: approxNun, approxDen - numerator and denominator of gear ratio 9 10 11 % Calculate the ratio approximation of planet!Period / planet 2Period within ratioTolerance 12 13 14 15 16 end 17 % Assign the numerator to approxNum and denominator to approxDen
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started