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 foundin previous step…should be in the intersection of the two line instep 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 –
PayPal Gateway not configured
PayPal Gateway not configured