Converting a Python Code to run on MATLAB
Ältere Kommentare anzeigen
Hi,
I have a particular block of code which I want to format so that I can run it on MATLAB. Could you please help me out with getting this converted?
import os, numpy as np
from ctREFPROP.ctREFPROP import REFPROPFunctionLibrary
def NBP():
RP = REFPROPFunctionLibrary(os.environ['RPPREFIX'])
print(RP.RPVersion())
RP.SETPATHdll(os.environ['RPPREFIX'])
r = RP.SETUPdll(1,"PROPANE.FLD","HMX.BNC","DEF")
assert(r.ierr == 0)
print(RP.PQFLSHdll(101.325, 0, [1.0], 0))
if __name__=='__main__':
# Print the version of REFPROP in use and the NBP
NBP()
3 Kommentare
Sindar
am 19 Okt. 2020
When asking conversion questions, the algorithm is more important than the code. What does this code do?
Harish Chandrasekar
am 19 Okt. 2020
Walter Roberson
am 19 Okt. 2020
There are matlab interfaces to refprop
Antworten (0)
Kategorien
Mehr zu Call Python from MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!