Thursday, October 06, 2005

mp1.m

I finally finished my first ever computer program!

(...also my second to last computer program...)


No more trekking to the DCL twice a day!


No more freezing in the Linux lab!

At least for a few more weeks......

5 comments:

Luke said...

So what did your first computer program do?

Anonymous said...

um jenny sorry to break your heart.. but kansas city is not a real city.. but have fun anyway hehe.

Jenny said...

The assignment was to design a suspension bridge using slinky springs. Given the number of springs (N+1), the total length of all the springs (L), the weights the vertical supporting cables will maintain (W, a vector), and the horizontal distances between the vertical supporting cables (d, a vector), I had to find the length of each of the vertical supporting cables (h, a vector). My program requests an initial guess from the user for HF , the horizontal force in the slinky chain. Given horizontal force HF, the spring constants (K, a vector) can be computed from the horizontal distances (d, a vector). From the spring constants K, the system of equations for the vertical positions h can be computed. Then it finds the lengths of all the individual springs and finds maximum length.
It also checks for a correct HF by calculating the sum of the lengths of all the springs and this should be equal to L.

got all that?

good... cause I don't :)

anna yo, hopefully someday you will see the light!!

Luke said...

sweet! How long does it take to run?

Jenny said...

um...its pretty quick. :) It's written for matlab so you just type the number in and it spits out the answer and three different graphs.