日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 人工智能 > 循环神经网络 >内容正文

循环神经网络

matlab-游标及查询

發(fā)布時(shí)間:2025/3/12 循环神经网络 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 matlab-游标及查询 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
exec創(chuàng)建游標(biāo)>> close(myconn) >> myconn=database('cdcol','mytest','deepfuture','com.mysql.jdbc.Driver','jdbc:mysql://localhost:3306/cdcol')myconn =Instance: 'cdcol'UserName: 'mytest'Driver: 'com.mysql.jdbc.Driver'URL: 'jdbc:mysql://localhost:3306/cdcol'Constructor: [1x1 com.mathworks.toolbox.database.databaseConnect]Message: []Handle: [1x1 com.mysql.jdbc.JDBC4Connection]TimeOut: 0AutoCommit: 'on'Type: 'Database Object'>> mycurs=exec(myconn,'select * from cds')mycurs =Attributes: []Data: 0DatabaseObject: [1x1 database]RowLimit: 0SQLQuery: 'select * from cds'Message: []Type: 'Database Cursor Object'ResultSet: [1x1 com.mysql.jdbc.JDBC4ResultSet]Cursor: [1x1 com.mathworks.toolbox.database.sqlExec]Statement: [1x1 com.mysql.jdbc.StatementImpl]Fetch: 0>>help exec--- help for database/exec ---exec Execute SQL statement and open CursorCURSOR = exec(CONNECT,SQLQUERY,QTIMEOUT) returns a cursor objectCONNECT is a database object returned by DATABASE. sqlQueryis a valid SQL statement. Use FETCH to retrieve data associatedwith CURSOR.Example:cursor = exec(connect,'select * from emp')where:connect is a valid database object.'select * from emp' is a valid SQL statement that selects allcolumns from the emp table.See also fetch.查詢結(jié)果fetch(mycurs)ans =Attributes: []Data: {3x4 cell}DatabaseObject: [1x1 database]RowLimit: 0SQLQuery: 'select * from cds'Message: []Type: 'Database Cursor Object'ResultSet: [1x1 com.mysql.jdbc.JDBC4ResultSet]Cursor: [1x1 com.mathworks.toolbox.database.sqlExec]Statement: [1x1 com.mysql.jdbc.StatementImpl]Fetch: [1x1 com.mathworks.toolbox.database.fetchTheData]>> a=ans>> a.Dataans ='Beauty' 'Ryuichi Sakamoto' [1990] [1][1x33 char] 'Groove Armada' [2001] [4]'Glee' 'Bran Van 3000' [1997] [5]>> mydata=a.Datamydata ='Beauty' 'Ryuichi Sakamoto' [1990] [1][1x33 char] 'Groove Armada' [2001] [4]'Glee' 'Bran Van 3000' [1997] [5]>> mydata{1,2}ans =Ryuichi Sakamoto>> mydata{1,1}ans =Beauty>> mydata{1,3}ans =1990 查詢參數(shù)>> cs='Beauty'cs =Beauty>> mycurs=exec(myconn,['select * from cds where titel =''',cs,''''])mycurs =Attributes: []Data: 0DatabaseObject: [1x1 database]RowLimit: 0SQLQuery: 'select * from cds where titel ='Beauty''Message: []Type: 'Database Cursor Object'ResultSet: [1x1 com.mysql.jdbc.JDBC4ResultSet]Cursor: [1x1 com.mathworks.toolbox.database.sqlExec]Statement: [1x1 com.mysql.jdbc.StatementImpl]Fetch: 0>> myres=fetch(mycurs)myres =Attributes: []Data: {'Beauty' 'Ryuichi Sakamoto' [1990] [1]}DatabaseObject: [1x1 database]RowLimit: 0SQLQuery: 'select * from cds where titel ='Beauty''Message: []Type: 'Database Cursor Object'ResultSet: [1x1 com.mysql.jdbc.JDBC4ResultSet]Cursor: [1x1 com.mathworks.toolbox.database.sqlExec]Statement: [1x1 com.mysql.jdbc.StatementImpl]Fetch: [1x1 com.mathworks.toolbox.database.fetchTheData]>>格式的配置>> setdbprefsDataReturnFormat: 'cellarray'ErrorHandling: 'store'NullNumberRead: 'NaN'NullNumberWrite: 'NaN'NullStringRead: 'null'NullStringWrite: 'null'JDBCDataSourceFile: ''UseRegistryForSources: 'yes'TempDirForRegistryOutput: 'C:\Users\DEEPFU~1\AppData\Local\Temp'DefaultRowPreFetch: '10000'>>>> help setdbprefsSETDBPREFS Set preferences for database actions for handling null values.SETDBPREFS(P,V) sets the preferences for database actions. P is thelist of properties to be set and V is the corresponding value list.SETDBPREFS(P) returns the property with its current setting.SETDBPREFS returns the property list with all current values.The valid properties are NullNumberRead, NullNumberWrite, NullStringRead,NullStringWrite, DataReturnFormat, ErrorHandling and JDBCDataSourceFile.The value for each property is entered as a string.For example, the commandsetdbprefs('NullStringRead','null')translates all NULL strings read from the database into the string'null'.The commandsetdbprefs({'NullStringRead';'NullStringWrite';'NullNumberRead';'NullNumberWrite'},...{'null';'null';'NaN';'NaN'})translates NULL strings read into the string 'null', NULL values to NaN. A NaN in thedata written to the database is translated to a NULL and a 'null' string is translated toNULL.The command setdbprefs('DataReturnFormat','cellarray') returns the datain the cursor Data field as a cell array which is the default behavior. Other values for DataReturnFormat are 'numeric' which returns the dataas a matrix of doubles and 'structure' which returns the data as a structurewith the fieldnames corresponding to the fetched fields.The command setdbprefs('ErrorHandling','store') returns any error messagesto the object Message field and will cause the next function that uses theobject to return an error. This is the default behavior. Other valuesfor ErrorHandling are 'report' which causes any function encountering an errorto report the error and stop processing and 'empty' which causes the fetchcommand to return the cursor Data field as [] when given a bad cursor objectresulting from exec.The command setdbprefs('JDBCDataSourceFile','d:\work\datasource.mat')sets the location of the JDBC data source information to the filed:\work\datasource.mat. This enables the Visual Query Builder to useboth ODBC and JDBC data sources. The command setdbprefs('JDBCDataSourceFile','')specifies that no JDBC data sources are being used by the Visual Query Builder.A single input can be used if it is a structure with fields corresponding to the validpreference names. Each field should contain a valid preferenc setting. For example,p.DataReturnFormat = 'cellarray';setdbprefs(p)帶限制輸入行數(shù)的fetch>> mycurs=exec(myconn,'select * from cds')mycurs =Attributes: []Data: 0DatabaseObject: [1x1 database]RowLimit: 0SQLQuery: 'select * from cds'Message: []Type: 'Database Cursor Object'ResultSet: [1x1 com.mysql.jdbc.JDBC4ResultSet]Cursor: [1x1 com.mathworks.toolbox.database.sqlExec]Statement: [1x1 com.mysql.jdbc.StatementImpl]Fetch: 0>> myres=fetch(mycurs,1)myres =Attributes: []Data: {'Beauty' 'Ryuichi Sakamoto' [1990] [1]}DatabaseObject: [1x1 database]RowLimit: 0SQLQuery: 'select * from cds'Message: []Type: 'Database Cursor Object'ResultSet: [1x1 com.mysql.jdbc.JDBC4ResultSet]Cursor: [1x1 com.mathworks.toolbox.database.sqlExec]Statement: [1x1 com.mysql.jdbc.StatementImpl]Fetch: [1x1 com.mathworks.toolbox.database.fetchTheData]字段相關(guān)屬性>> mycurs=exec(myconn,'select * from cds')mycurs =Attributes: []Data: 0DatabaseObject: [1x1 database]RowLimit: 0SQLQuery: 'select * from cds'Message: []Type: 'Database Cursor Object'ResultSet: [1x1 com.mysql.jdbc.JDBC4ResultSet]Cursor: [1x1 com.mathworks.toolbox.database.sqlExec]Statement: [1x1 com.mysql.jdbc.StatementImpl]Fetch: 0>> myres=fetch(mycurs)myres =Attributes: []Data: {3x4 cell}DatabaseObject: [1x1 database]RowLimit: 0SQLQuery: 'select * from cds'Message: []Type: 'Database Cursor Object'ResultSet: [1x1 com.mysql.jdbc.JDBC4ResultSet]Cursor: [1x1 com.mathworks.toolbox.database.sqlExec]Statement: [1x1 com.mysql.jdbc.StatementImpl]Fetch: [1x1 com.mathworks.toolbox.database.fetchTheData]行數(shù)>> rows(myres)ans =3列數(shù)>> cols(myres)ans =4字段名>> columnnames(myres)ans ='titel','interpret','jahr','id'>>列寬1-3列的寬度>> width(myres,1)ans =200>> width(myres,2)ans =200>> width(myres,3)ans =11>>指定列的屬性下面是第2列屬性>> attr(myres,2)ans =fieldName: 'interpret'typeName: 'VARCHAR'typeValue: 12columnWidth: 200precision: []scale: []currency: 'false'readOnly: 'false'nullable: 'true'Message: []>>或者>> myattrs=attr(myres)myattrs =1x4 struct array with fields:fieldNametypeNametypeValuecolumnWidthprecisionscalecurrencyreadOnlynullableMessage>> myattrs(1)ans =fieldName: 'titel'typeName: 'VARCHAR'typeValue: 12columnWidth: 200precision: []scale: []currency: 'false'readOnly: 'false'nullable: 'true'Message: []>>

總結(jié)

以上是生活随笔為你收集整理的matlab-游标及查询的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。