Withmatlab_wrapperyoucaneasilytalktoMATLABfromyourPythonscriptsandaninteractiveshell.MATLABsessionisstartedinthebackgroundandappearsasaregularPythonobject.
Info:matlab_wrapperismaintained,butnotactivelydeveloped.
UsageInitialize:
importmatlab_wrappermatlab=matlab_wrapper.MatlabSession()Lowlevel:
matlab.put('a',12.3)matlab.eval('b=a*2')b=matlab.get('b')Workspace:
s=matlab.workspace.sin([0.1,0.2,0.3])sorted,idx=matlab.workspace.sort([3,1,2],nout=2)matlab.workspace.a=12.3b=matlab.workspace.bMoreexamplesareintheexamplesdirectory!
FeaturesAccessMATLABvariablesandfunctionsfromPythonMultiplatform:GNU/Linux,Windows,OSXOn-the-flyconversionbetweenMATLABandNumpydatatypesSupportforMATLAB'snumerical,logical,struct,andcellarraysPurePython,noneedtocompileanything(matlab_wrappertalkstoMATLABenginelibraryusingctypes)Foracompletelistofchangesincludingnewfeatures,checktheNEWS.rstfile.
InstallationFirst,makesurethatyouhavethefollowingcomponentsinstalled:
Python2.7MATLAB(variousversions)NumpyNext,installmatlab_wrapperusingpip(thestandardPythonpackageinstallationtool)fromyourcommandline:
pipinstallmatlab_wrapperContributeCheckourCONTRIBUTINGguidelines.
IssueTracker:https://github.com/mrkrd/matlab_wrapper/issuesSourceCode:https://github.com/mrkrd/matlab_wrapperSupportIfyouarehavingissues,pleaseletmeknowthroughtheissuetracker:https://github.com/mrkrd/matlab_wrapper/issues.Trytoavoidduplicatesbysearchingpreviousissues,checkingFAQ,andCONTRIBUTING.
Acknowledgmentsmatlab_wrapperwasforkedfrompymatlab.
MATLABisaregisteredtrademarkofTheMathWorks,Inc.
LicenseTheprojectislicensedundertheGNUGeneralPublicLicensev3orlater(GPLv3+).
评论