finding altitude using matlab atmosisa given pressure
조회 수: 1 (최근 30일)
이전 댓글 표시
hello, im trying to determine altitude using matlab atmosisa function, given P = 61.7*1000;
What is the best way to go about solving this, thank you.
matlab atmosisa function
[T,a,P,rho,nu,mu] = atmosisa(height)
% given
p = 61.7*1000; % pascal
댓글 수: 0
채택된 답변
Sam Chak
2024년 10월 20일
Hi @Irfan
You can use this minimization approach.
altitude = ga(@costfun, 1, [], [], [], [], 3.9e3, 4e3)
%% Check result
[~, ~, P, ~, ~, ~] = atmosisa(altitude)
%% Cost function
function J = costfun(height)
[~, ~, P, ~, ~, ~] = atmosisa(height);
p = 61.7*1000;
J = (P - p)^2;
end
댓글 수: 0
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Curve Fitting Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!