Thursday, September 17, 2015

HW #6

PROBLEM #1: ROCKET HEIGHT VS. TIME





PROBLEM #2: SOLID ROCKET FUEL PASS/FAIL

Output for Problem # 2




PROBLEM #3: 401K RETIREMENT SAVINGS



Function for Problem #3:

   
 

HW #5

#1: ASTM GRAIN SIZE






#2: POLYGON


 This function will graph a polygon based on the number of sides the user inputs. Below is an example polar graph when the user inputs 5 for the number of sides.





PROBLEM #3: ENERGY VS MASS






PROBLEM #4: DISTANCE TO THE HORIZON





PROBLEM #5: DISTANCE, VELOCITY, AND ACCELERATION IN FREE FALL







Blog Post #8 for 09/17

FOR LOOP PRACTICE
 The program on top will determine how many numbers in matrix x are greater than thirty (basically the find tool), while the program on the bottom sums all of the values of matrix x (basically the sum tool).


WHILE LOOP PRACTICE
 This function also replicates the embedded 'find' function in matlab, but it uses a while loop rather than a for loop.


ALTERNATING HARMONIC SERIES
 This program will determine how many cumulative sums are required in order to calculate ln(2) within four digits of precision.


DIVERGING SERIES
 This program determines how many cumulative sums must be performed until the two values for 'total' are separated by at least 0.001. The program will stop if more than 50 sums are required.


FACTORIAL
This function will determine the factorial for a user inputted value, which is simply the MatLab embedded 'factorial' function.

Blog Post #7 for 09/15

PART LENGTH

This simple function allows the user to input a part length, and will determine whether or not that particular part meets the criteria. If not, the program will put you down.


NAVY HEIGHT REQUIREMENT

 This program will analyze the heights of Navy applicants and output a table of accepted and declined candidate based on the height inputs.


ROCKET TRAJECTORY

 This simple program allows the user to input a particular time and determine whether the rocket is in stage 1, stage 2, stage 3, or free fall.


HOSPITAL TEMPERATURES


This program will analyze a matrix of numbers representing the temperatures of patients (rows = patient number, columns = station number) and determine which patients have a fever. It will output which patient at which station, along with the temperature of that particular patient.

Output:



GAS PRICES

This program allows the user to input the unit of measurement they would like to use to fill their gas tank, as well as the amount of gasoline, and it will output the price to fill their car with that amount of gasoline assuming $3.89 per gallon.

Output:




LEGAL DRINKING AGE

This function allows the user to enter their age and determines whether or not they are old enough to drink alcohol.

Output: 

Blog Post #6 for 09/10

DIFFUSIVITY EXERCISE

This program uses a similar prompt as the one in the homework, except this one will calculate and plot the diffusivity of two different materials based on a set of temperatures.

Graphical output of the data from the program above. Alpha diffusivity is depicted in blue, while beta diffusivity is depicted in red.



TURN A HELIX INTO A TORNADO
In this exercise, we were given a program that graphs a helix horizontally along the x-axis. We were told to transform this helix into a vertically standing "tornado" shape. This was done by manipulating the three equations to have the data set run along the z-axis rather than the x-axis and adjusting some of the values within the equation






MESHGRID


In this exercise, we used the meshgrid function in order to combine two matrices into a single large matrix. We plotted this matrix using four different 3-D graphing tools embedded within MatLab.





HALL-PETCH EXERCISE












Thursday, September 10, 2015

HW #4

PROBLEM #1

This program calculates the stress and strain based on data collected of force applied and the change in length of a specific material. The program will also output a graphical interpretation of stress vs. strain along with a text box indicating the yield point of the material.


This is the graphical output of the function above.



This program will output various shapes (flower, heart, hexagram, hexagon) in polar coordinates and output 4 subplots within the same window of said shapes



Graphical output of the program above.



This program takes the inputs of raw data by year of the number of transistors per square inch on a processor at that particular time and compare it to Moore's equation, which is a model predicting the expansion of transistors on computer processors over time. The first part of the program outputs a table which models Moore's prediction, while the rest of the program is designed to output two separate figures each containing graphical data.

Computational models of Moore's law using 4 different logarithmic graph types within the same figure window (linear, semilogx, semilogy, loglog).

Graphical representation of Moore's law versus the actual data taken over the last 5 decades.