MATLAB + DATABASE + MYSQL

来源:互联网 发布:cpa做题软件 编辑:程序博客网 时间:2024/06/05 10:14

Problem 1:


solution:

http://www.mathworks.com/matlabcentral/answers/97492-why-do-i-get-an-out-of-memory-error-when-i-use-the-fetch-function-in-database-toolbox-3-1-1-r2006a

Problem2:


Solution:

exec(conn, 'create table producttable (id INTEGER PRIMARY KEY, productNumber INTEGER,stockNumber INTEGER,supplierNumber INTEGER, unitCost REAL,productDescription TEXT)')

colnames = {'id', 'productNumber','stockNumber','supplierNumber',...
'unitCost','productDescription'}

coldata = {1, 11,800999,1006,9.00,'Toy Car'}

insert(conn,'productTable',colnames,coldata);

curs = exec(conn, 'select * from productTable');
curs = fetch(curs)

Result:



0 0
原创粉丝点击