我有使用mysql数据库的php项目,我的问题是如何将数据从php(从mysql数据库获取的数据)传递给MATLAB程序,是否有任何工具可以做到这一点?
No need to use PHP. You can issue SQL statements to import data into the MATLAB workspace using the Database Toolbox .
Example:
logintimeout(5)
conn = database('dbtoolboxdemo', 'username', 'password')
curs = exec(conn, 'select productNumber, productDescription from productTable')
>> curs =
Attributes: []
Data: {10x1 cell}
DatabaseObject: [1x1 database]
RowLimit: 0
SQLQuery: 'select productdescription from producttable'
Message: []
Type: 'Database Cursor Object'
ResultSet: [1x1 sun.jdbc.odbc.JdbcOdbcResultSet]
Cursor: [1x1 com.mathworks.toolbox.database.sqlExec]
Statement: [1x1 sun.jdbc.odbc.JdbcOdbcStatement]
Fetch: [1x1 com.mathworks.toolbox.database.fetchTheData]
close(curs)
close(conn)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.