HW6_ruzmora

# HW6_ruzmora - Page 2 v_c = linspace(4,20,15) %Chapter 2...

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

Sheet1 Page 1 %Chapter 2 Problem 5a %This program calculates the volume of a cylinder clear all clc r = 3 h = [1 5 12] disp('Volume of cylinder') v = pi*r^2*h%Calculate volume of cylinder %Chapter 2 Problem 5b %This program calculates the area of a triangle b = [2 4 6] h = 12 disp('Area of triangle') a = .5*b*h%Claculate area of triangle %Chapter 2 Problem 5c %This program calculates the volume of a right prism vert_dim = 10 disp('Volume of prism') v_prism = a*vert_dim%Calculate volume of prism %Chapter 2 Problem 6a %This program generates evenly spaced vector values from 1 to 20, in %increments of 1 clear all clc v_a = [1:20] %Chapter 2 Problem 6b %This program generates vector values from 0 to 2pi, in %increments of pi/100 v_b = [0:pi/100:2*pi] %Chapter 2 Problem 6c %This program generates 15 vector values from 4 to 20

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

View Full Document
Sheet1

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.

Unformatted text preview: Page 2 v_c = linspace(4,20,15) %Chapter 2 Problem 10 %This program calculates the distance traveled by a free falling object clear all clc g = 9.8 t = 1:10 d = 0.5*g*t.^2 disp('Time(s) Distance(m)') table = [t', d'] %Chapter 2 Problem 11 %This program uses Newton's law of universal gravitation to tell us the %force exerted by one particle on another clear all clc G = 6.673e-011 m_1 = 6e+024 m_2 = 7.4e+022 r = 3.9e+08 F = G*(m_1*m_2/r^2) %Calculate the force Sheet1 Page 3 %radius of cylinder %height of cylinder %base of triangle %height of triangle %Vertical dimension of prism Sheet1 Page 4 %m/s^2 %seconds % Calculating distance traveled % Nm^2/kg^2 %mass of the earth in kilograms %mass of the moon in kgilograms %distance between the earth and the moon in meters...
View Full Document

## This note was uploaded on 05/21/2010 for the course EEL 2161 taught by Professor Lopez during the Spring '10 term at FAU.

### Page1 / 4

HW6_ruzmora - Page 2 v_c = linspace(4,20,15) %Chapter 2...

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

View Full Document
Ask a homework question - tutors are online