equation code not getting right answer
    조회 수: 2 (최근 30일)
  
       이전 댓글 표시
    
Hello, I'm trying to code this expression, this is my attempt but I'm not getting the same answer/value, not sure what I'm doing wrong. Any help/guidance will be appreciated.

% Given values
%AInfinity = 1;
%AInlet = 6.5;
MInlet = 0.5;
MInfinity = 2;
gamma = 1.4;
a = (1 + (gamma-1/2)* MInfinity^2)
b = (1 + (gamma-1/2)* MInlet^2)
b1 = (MInlet/MInfinity)
r = b1*(a/b)^(gamma + 1/(2*gamma -1))
댓글 수: 0
채택된 답변
  VBBV
      
      
 2024년 3월 2일
        
      편집: VBBV
      
      
 2024년 3월 2일
  
      % Given values
%AInfinity = 1;
%AInlet = 6.5;
MInlet = 0.5;
MInfinity = 2;
gamma = 1.4;
a = (1 + ((gamma-1)/2)* MInfinity^2)  % for numerator 
b = (1 + ((gamma-1)/2)* MInlet^2)  % for numerator
b1 = (MInlet/MInfinity)
r = b1*(a/b)^((gamma + 1)/(2*(gamma -1)))  % for num and den
댓글 수: 3
  Torsten
      
      
 2024년 3월 17일
				I just would like to know if these are well coded?
Yes, the two expressions are correctly coded.
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Gamma Functions에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




