Question: Help with matlab! 1 Box on a Slope function [prediction] = myBoxPrediction(n, Description Mass of the box (grams) Friction coefficient between the box and the

 Help with matlab! 1 Box on a Slope function [prediction] =
myBoxPrediction(n, Description Mass of the box (grams) Friction coefficient between the box
Help with matlab!

1 Box on a Slope function [prediction] = myBoxPrediction(n, Description Mass of the box (grams) Friction coefficient between the box and the slope Angle of the slope from horizontal (degrees) Description Prediction of critical value or whether or not box will f, theta) Type 1x1 double 1x1 double 1x1 double Type char array Input theta Output prediction slide Details A box sitting on a sloped surface is influenced by gravity in a way that pulls the box down the slope. Friction resists this effect, with the frictional force being proportional to the normal force between the box and the slope where Fr is the frictional force, Fv is the normal force, and f is the static or dynamic friction coefficient, as appropriate. As the slope gets steeper or the friction coefficient decreases, eventu- ally the frictional force will not be sufficient to keep the box in place and it will slide down the slope. In this problem, you should solve the force balance for this critical value of the slope or the friction coefficient. You will write the function myBoxPrediction that has the inputs m, f and theta to describe the box on a slope problem. Your code should be able to take' as an input for either f or theta and should returna prediction for the critical value of f or theta, depending on which is replaced with? If t is replaced with 2', your code should return: If f is less than [value, the box will sli If theta is replaced with '2', your code should return: If theta is greater than Ivalue] degrees, t will be replaced with the value of the variable. Finally, if all values are input (ie. ? , is not used as an input), your function should make a prediction and should return either: In each case (value] "The box will slide. or The Tips box wil1 not slide.' g= 9.81 m/s2 To format your answers involving a numerical value, use the command sprintf and use a floating point number with 5 places including 2 decimals (%5.2f)

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!