Explore BrainMass

Matlab codes

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

Hello again, I am posting a issues I need help with in matlab that the book does not help period. Again, adult student doing his best to learn everything he can and most efficiently to build my skills beyond these basics. I am trying to incorporate many things from the books that give no examples to learn better.

Please show me in matlab language how to write in code all the following. Thanks as always for believing in my educational goals!

1) Program 1

Using the mfile window the height and distance traveled by a ball thrown at an angle A and with a speed v is: [h(t) =vtsin(A)-0.5gt^2] , [x(t)=vtcos(A)].
Answer the following using v=10m/s and a time step of 0.001 and g=9.81m/s^2.

a) Use a loop, (now this book references using a for loop for one part and a while loop in the other part of this problem and do not know why), to calculate and plot the height versus ime for the angle A=35 degrees. Also, use the max function to find the maximm height reached and the time it takes to reach that height(the corresponding time instant).
b) Polt on the same graph the trajectories (ie plot h versus x) corresponding to three different angles A=20 degrees, 45degrees,and 70 degrees.
c) Using the angle A=30 degrees, plot the trajectories corresponding to three different velocities v=10,20,30m/s, on thre different graphs arranged vertically on the same page using subplot.

© BrainMass Inc. brainmass.com October 24, 2018, 8:24 pm ad1c9bdddf

Solution Summary

The solution includes Matlab codes.

See Also This Related BrainMass Solution

Molecular Dynamics MATLAB Code

Write the simplest possible one-dimensional "molecular dynamics code" for two particles?
I use MATLAB, so I want a MATLAB code for molecular dynamics or velocity verlet algorithm code.
I need to determinate x1, x2 and v1, v2 in different times.

Some websites may help you:

I don't have experience in MATLAB, so this so difficult for me.
I tried reading about it, but I became more puzzled.

Someone help me please.

View Full Posting Details