{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ps5solnsSp06

# ps5solnsSp06 - %Engineering 6 Spring 2006 Problem 5.1...

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

%Engineering 6, Spring 2006, Problem 5.1 Solution %(Wall thickness of a box) %Suppress extra lines in output and set fixed short display format compact ; format short ; clc; %Clear command window and variables clear; %Equation for weight that is derived: % W = gamma*(24*12*4) - gamma*(24-2*x)(12-2*x)(4-x) %or % W - gamma*(24*12*4) - gamma*(24-2*x)(12-2*x)(4-x) = 0 %Define variables for weight of box and specific wt. of aluminum W = 15; gamma = 0.101; %Define coefficient vectors for the three polynomials in the equation a = [-2 24]; b = [-2 12]; c = [-1 4]; %Multiply the polynomials to get the coefficient vector for %the second term in the equation second_term = gamma*conv(a,conv(b,c)); %Construct the coefficient vector for the whole equation. It will be %a third order equation, so four coefficients total. Note that the constant %term has to be written as a vector with four coefficients, so that %the addition can be done (thus the three zeros). poly_coeffs = [0 0 0 W-gamma*24*12*4] + second_term; %Display these coefficients and the polynomial it represents disp( 'The polynomial coefficients are:' );

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.

{[ snackBarMessage ]}

### Page1 / 4

ps5solnsSp06 - %Engineering 6 Spring 2006 Problem 5.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