ps2solnsSp06

# ps2solnsSp06 - %Engineering 6, Spring 2006, Problem 2.1...

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

%(Richter scale calculation) %Turn off extra line breaks in display format compact ; %Clear command window and variables clc; clear; %Define reference energy E0 = 10^4.4; %Part (a) %Calculate and display energy for magnitude 6.0 earthquake M = 6; E6 = E0*10^(1.5*M); disp( 'Energy of a magnitude 6.0 earthquake (in joules):' ); disp(E6); disp( ' ' ); %blank line %Calculate and display energy for magnitude 7.0 earthquake M = 7; E7 = E0*10^(1.5*M); disp( 'Energy of a magnitude 7.0 earthquake (in joules):' ); disp(E7); disp( ' ' ); %blank line %Calculate and display energy for magnitude 8.0 earthquake M = 8; E8 = E0*10^(1.5*M); disp( 'Energy of a magnitude 8.0 earthquake (in joules):' ); disp(E8); disp( ' ' ); %blank line %Part (b) %Calculate and display energies in "atomic bomb" units and %"WTC collapse" units A_bomb = 6.3*10^13; %Atomic bomb energy in joules WTC_collapse = 6.8*10^11; %WTC collapse energy in joules E6_bomb = E6/A_bomb; E6_collapse = E6/WTC_collapse; disp( 'A magnitude 6.0 quake is equivalent to this many Hiroshima atomic bombs:' ); disp(E6_bomb); disp( 'A magnitude 6.0 quake is equivalent to this many WTC collapses:' ); disp(E6_collapse); disp( ' ' ); %blank line E7_bomb = E7/A_bomb; E7_collapse = E7/WTC_collapse; disp( 'A magnitude 7.0 quake is equivalent to this many Hiroshima atomic bombs:' ); disp(E7_bomb);

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 01/22/2011 for the course ENG 006 taught by Professor Lagerstrom during the Spring '06 term at UC Davis.

### Page1 / 5

ps2solnsSp06 - %Engineering 6, Spring 2006, Problem 2.1...

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

View Full Document
Ask a homework question - tutors are online