I am encounering a problem when using asin function. function is solving the problem always between 0 and pi/2. why?
a=0.5;x=[0.0 0.5 0.75 1.250 2.5 5.0 7.5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100]./100-0.5 ;y=[0.0 0.394 0.475 0.594 0.795 1.090 1.322 1.518 1.828 2.066 2.245 2.375 2.459 2.498 2.487 2.420 2.290 2.106 1.881 1.623 1.339 1.038 0.729 0.430 0.165 0.0];X=[x flip(x)]Y=[y flip(y)]; for k=1:numel(X) p(k) = 1-((X(k)./(2*a)).^2)-(Y(k)./(2*a)).^2; sin2the(k) = (p(k)+sqrt(p(k).^2+(Y(k)./a)^2)); sinthe(k) = sqrt(sin2the(k)./2); theta(k) = asin(sinthe(k)); psi(k) = asinh(Y(k)./(2.*a.*sinthe(k))); endplot(theta,psi)
graphic of psi againts theta must be like in picture
Best Answer