how to call struct array in subroutine
이전 댓글 표시
i want to call these value in my subroutine(function). so how to write a code
Air.Tin=303;
Air.Tout=310;
Air.Pin=101325;
Air.Pout=101500;
Air.win=10;
Air.wout=7;
Air.hin=300;
Air.hout=360;
Air.Qs=80;
Air.Qlh=30;
댓글 수: 3
Guillaume
2019년 10월 29일
You have written the code. It's not clear what more you're asking.
Walter Roberson
2019년 10월 29일
Example:
%....
output = MyFunction(Air);
%...
function results = MyFunction(AirInfo)
results = AirInfo.Qlh .^ AirInfo.wout + atan2(AirInfo.Pout, AirInfo.Pin);
end
RAHUL KUMAR
2019년 10월 29일
답변 (1개)
James Tursa
2019년 10월 29일
0 개 추천
카테고리
도움말 센터 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!