# Lab A - SD function[RateOfIncrease]=SD%This function will...

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

SD function [RateOfIncrease]=SD %This function will determine the instantaneous rate of increase of the %surface area with respect to volume when the volume is 30 in^3 %OUTPUTS: RateOfIncrease, ds/dv at 30 in^3 %INPUTS: none syms V r = (3*V/(4*pi))^(1/3); % express r in terms of V S = 4 * pi * r^2; %surface area in terms of V (since r is a function of V) dSDV = diff(S); % differentiate S wrt V RateOfIncrease=double(subs(dSDV, V, 30)); % substitute V=30 in DSDV Prob1 function [minVal] = Prob1 %PURPOSE: find x value of the minimum of function f(x) = 2^(.2*x) - x/4, %also this will generate a plot using ezplot %INPUTS: none %OUTPUTS: minVal, the value of x for which f(x) is minimum syms x F = 2^(.2*x) - x/4; dF = diff(F,x); minVal=double(solve(dF)); %using double converts the symbolic answer to a value ezplot(F) Prob2 function [K1]=Prob2(X1) %PURPOSE: find k value of function g(x) = 2^(.2*x) - x/k which will %generate a minimum at X1 %INPUTS: X1, the x value at which g(x) has its minimum %OUTPUTS: K1, the value of k for which g(X1) is the minimum value of

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 03/30/2008 for the course CSE 131 taught by Professor Sticklen during the Spring '08 term at Michigan State University.

### Page1 / 2

Lab A - SD function[RateOfIncrease]=SD%This function will...

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

View Full Document
Ask a homework question - tutors are online