Question: Matlab Using Fzero and Anonymous Function Below is my code to plot my function. I need to add a few things... 1.) a blue dashed

Matlab Using Fzero and Anonymous Function

Below is my code to plot my function.

I need to add a few things...

1.) a blue dashed line at Cx = 0.005

2.)Use fzero and getCx to find the time(t) to produce Cx = 0.005, if x = 0.005, and T = 900

3.) Add a red circle to the plot using the Cx and t values found in previous step...should be in the intersection of the two line in step 1

T = 900; x = 0.0005; t = linspace(0,10000);

Cx = getCx(t,x,T);

plot(t,Cx,'b'); xlabel('Time(s)') ; ylabel('Concentration'); legend('Concentration over Time'); title('Plot');

function Cx = getCx(t,x,T) D0 = 2.0*10^-5; R = 8.314; Q = 142*10^3; Cs = 0.01; Cx = Cs * (1 - erf(x ./ (2 * t * sqrt(D0*exp(-Q/(R*T)))))); end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!