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

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

View Full Document Right Arrow Icon
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
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

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 Right Arrow Icon
Ask a homework question - tutors are online