Contour Plot Problem...X-axis is defined by equation.

I want to generate a theta(x), beta(y), mach chart using the equation tan(theta)=2*cot(Beta)*[((M^2)*sin^2(Beta-1)) / ((M^2)*(1.4+cos(2*Beta))+2)].
theta should end up 0->~46 degrees. I want Mach numbers of 1.05->20. Beta = 0->90 degrees.
This is what I have (I know its' bad)...
beta=(1.05:.1:20); M=(1.05:.1:20); [B,M]=meshgrid(beta,M); theta=atand((2.*cot(beta)).*(((M.^2).*(sind(beta-1).^2))./((M.^2).*(1.4+cosd(2.*beta))+2))); contour(theta,B,M)

 채택된 답변

Kelly Kearney
Kelly Kearney 2011년 8월 15일

0 개 추천

Two things...
1) You need to replace beta with B in your theta definition, or you'll encounter matrix dimension clashes
2) I assume you want cotd instead of cot for cotangent, since everything's in degrees.

댓글 수: 1

Ryan
Ryan 2011년 8월 15일
I thought it was too easy to be true but it wasn't. Thank you very much!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Environmental Models에 대해 자세히 알아보기

질문:

2011년 8월 15일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by