Homework Solutions 01 matlab

# Homework Solutions 01 matlab - Homework Solutions Week 1...

This preview shows pages 1–3. Sign up to view the full content.

Homework Solutions - Week 1 440:127 - Spring 2012 - S. J. Orfanidis clear all % ---------- here, we call the problem subfunctions in sequence to generate the results ---------- problem_2_14 problem_2_15 problem_2_18 stopping_distances % ---------- here, we list the individual subfunctions ---------- Problem 2.14 function problem_2_14 format short e; % use scientific printing format g = 9.8; % meters/sec^2 t = 0:10:100; d = 1/2*g*t.^2; time_distance = [t',d'] % ------------------------------------------------------------ time_distance = 0 0 1.0000e+001 4.9000e+002 2.0000e+001 1.9600e+003 3.0000e+001 4.4100e+003 4.0000e+001 7.8400e+003 5.0000e+001 1.2250e+004 6.0000e+001 1.7640e+004 7.0000e+001 2.4010e+004 8.0000e+001 3.1360e+004 9.0000e+001 3.9690e+004 1.0000e+002 4.9000e+004 Problem 2.15 function problem_2_15 d = 0.001; % meters area = pi*d^2/4; % meters^2 length = 2; % meters rho = [1.59e-8; 1.68e-8; 2.44e-8; 2.82e-8; 1.0e-7]; % column vector of resistivities I = 120; % current in Amperes P = I.^2.*rho.*length./area % power in Watts % ------------------------------------------------------------ P = 5.8304e+002

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6.1604e+002 8.9473e+002 1.0341e+003 3.6669e+003 Problem 2.18 function problem_2_18 G = 6.673e-11; % use SI units m_earth = 6e24; m_moon = 7.4e22; r = linspace(3.8e8,4.0e8,10)'; % column vector of 10 distance values F = G * m_earth * m_moon ./ r.^2; % column vector - notice the .^ and ./ operators distance_force = [r,F] % r,F columns are side-by-side format; % revert to default format
This is the end of the preview. Sign up to access the rest of the document.

## This document was uploaded on 03/26/2012.

### Page1 / 5

Homework Solutions 01 matlab - Homework Solutions Week 1...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online