how to call struct array in subroutine

1 Ansicht (letzte 30 Tage)
RAHUL KUMAR
RAHUL KUMAR am 29 Okt. 2019
Beantwortet: James Tursa am 29 Okt. 2019
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 Kommentare
Walter Roberson
Walter Roberson am 29 Okt. 2019
Example:
%....
output = MyFunction(Air);
%...
function results = MyFunction(AirInfo)
results = AirInfo.Qlh .^ AirInfo.wout + atan2(AirInfo.Pout, AirInfo.Pin);
end
RAHUL KUMAR
RAHUL KUMAR am 29 Okt. 2019
i want to use structure array to store these value and then these value i call to these value in different function .So how to write a code for this ,to store some struct array and call these array in subroutine

Melden Sie sich an, um zu kommentieren.

Antworten (1)

James Tursa
James Tursa am 29 Okt. 2019

Kategorien

Mehr zu Structures finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by