I want to solve a problem in which I am given a function (seen below) where W is 4.9 and I must find v. I have to use the fzero method but I am having trouble with how to find the roots. How can I do this? (Function file and script file ARE separate and below)
function W = dforce(v)global ro d mu ARe = (ro*v*d)/mu;Cd = (24/Re)+(6/(1+sqrt(Re)))+0.4;W = Cd*0.5*ro*v^2*A;end_________________________________________________________________________________________________________clear all, close allglobal ro d mu Am = 0.5;g = 9.8;N = m*g;R = 287;P = 101300;d = 15;A = (pi*d^2)/4;T = linspace(-60,60,121); NT = length(T); mu = zeros(size(T)); ro = mu; for i = 1:NT b1 = 2.156954157e-14; b2 = -5.332634033e-11; b3 = 7.477905983e-8; b4 = 2.527878788e-7; mu(i) = b1*T(i)^3+b2*T(i)^2+b3*T(i)+b4; ro(i) = P/(R*T(i)); dF = @(v)dforce(v)- N; V = fzero(dF,0); end
Best Answer