Hello,
I want to draw a boundary line for my contour
you can see my contour (without bondary) and a contour with boundary (desired)
you can see my contour (without bondary)
here is my code:
clc,clear,close all;% syms z y ;B = 10;H = 5;C = 10;L1 = 1;Ri = B/2 + L1;Rf = C + B/2 + L1;y = linspace(-25,0,1000);z = linspace(0,28,1000);[Z,Y] = meshgrid(z,y);r1 = sqrt((Y.^2)+(Z.^2));r = abs(sqrt((Y.^2)+(Z.^2)) - Rf);beta = asin( Z ./ sqrt((Y.^2)+(Z.^2)) );beta(1000,1) = 0;Rbeta = Ri + (2.*beta.*(Rf-Ri)./pi);Rt0 = B/2+L1;Rmaxtb = (Rt0.*Rbeta)./Ri;Vmbeta = (2*(pi^2)*((B+(2*L1))^2)) ./ ((((2*L1*pi)+(pi*B)+(4.*beta.*C)).^2));% Calculate the distance for conditionRt00 = (B/2-L1);Rmaxtbb = (Rt00.*Rbeta)./Ri;% Endfor i = 1:1:1000 for j = 1:1:1000 if r(i,j)>Rbeta(i,j) | r1(i,j)>(Rf+Rmaxtbb(i,j)) Vbeta(i,j)=0;else Vbeta(i,j) = Vmbeta(i,j) * (1 - ((r(i,j)^2) / (Rmaxtb(i,j)^2)));end endendZZ = Z./B;YY = Y./B;contourf(ZZ,YY,Vbeta,100,'edgecolor','none')colormap( flipud(gray(256)) )colorbarxlabel('z/D') ylabel('y/D')
any help is appreciated
Best Answer