0
votes

i wrote the following matlab code :

L=100;
N=[0:L];
D=8.62;
Z=95;
Dmax=1./12;
X=@(N) N./((N.*D)+ Z);
X2=@(N) N./(D+ Z);

z1 = fzero(@(x) X(x)-Dmax, 0);

plot([0 100],[Dmax Dmax],'r')
hold all
fplot(X,[0 L 0 0.3],'g')
fplot(X2,[0 L 0 0.3])
plot(z1, 'ro')
legend('1/Dmax','N/(ND+Z)','N/(D+Z)','N*')

i want to plot the point of intersection between the green curve and the red line, the x- value of the intersection and a discontinuous lign connecting the intersection point to x-axis!

1

1 Answers

0
votes

To plot it, you have to calculate the intersecting point. I suggest to use the symbolic toolbox, if not available a numerical solution is possible as well.

plot(solve(X(sym('a'))==Dmax),Dmax,'o')