Monday, October 5, 2015

Day 5 - Plotting

Day 5:
We started the day with learning about plotting. We learned function and ways to change the color and the way lines are marked into the plot. We also went over how to add titles and use the hold on and hold off command, later on we used subplot to add many graphs into one display.

Snips of 1st request





We then worked on a diffusion problem. Here is a picture.

We then worked on the Clausius-clapeyron equation example.

We then worked on a ballistic problem. Here is a picture.

We plotted them and figured out which type of plot does best to represent the data.

Conclusion:
Today we learned how to plot and make subplots and how to edit them to look pretty and useful to the reader. We then worked on different examples and found which type of plot would best to interpret the data such as log, semilog, or loglog.

HMWK 5-1
function output = num_grains(N); %find the ASTM of grains
output = (log10(N) + log10(2))./log10(2); %formula for finding N
N = 1:100;
n = num_grains(N);
plot(N,n) %plot of N,n
title('ASTM Grain Size') %title
xlabel('Number of grains') %x-axis of grains
ylabel('ASTM Grain Size') %y-axis of grains

5-4
function output = horizon (r,h); %horizon
d = sqrt(2*r*h+h.^2) %d formula

No comments:

Post a Comment