Quoted:
This script must be done in matlab and it states I need to create a script that has the following components... 1.must contain at lease three functions (at least two must accept parameter inputs), 2. input from the user, 3. output in graphs, 4. "if" or "switch" statements, 5. "for" or "while" statements.
I want to do something that pertains to small arms or ballistics. I made the following function that calculates recoil in ft/lbs, but I am lost on what to do and add from here. Does anyone else have any ideas? My script below seems useless since it would be almost impossible to calculate time to the target.
I'm honestly about to give up on calculating the recoil and try something else. Any idea or suggestions from you Matlab experts out there?
View Quote
I'm not sure what exact help aspect you are looking for...
Just additional sub functions (as in what to also calculate), or how to get it all working together?
Based on your description of what is required, this is a pretty simple assignment. Along those lines, keep it simple.
Do a rudimentary ballistics calculator, not a full on one. One function to calculate distance given initial height, velocity, and angle. One function to find maximum height. One function to find TOF. Input variables can be height, gravity, angle, velocity. You switches and for/while loops can simple be over a range of the input values. or to compare values for different planets. Numbers on mars vs earth. Hell, add in mass and you can calculate energies.
Don't even dick around with anything more complicated than that, on a simple assignment like you've got described above. Meet all the requirements, get your 100%. Use the saved time for other classes.