Download MATLAB and matlab

Source: Internet
Author: User

Download MATLAB and matlab
MATLAB-SQL connection technology [pure code] code block

Code block syntax follows standard MATLAB code

Function conn_matlab dB () % UI 2015.6.27 MATLAB R2013b % function Description: establish a connection between matlab and Database SQL % JDBC connection method: install driver package-> Add path-> restart matlab %-> establish database connection (based on SQL Server 2008) % reference connection http://m.blog.csdn.net/blog/wang_306/37818681%% input (by this): Database Name, user name, password, drive name *, local server address * databasename = 'testdb'; username = 'testuser'; password = '******'; driver = 'com. mysql. jdbc. driver '; databaseurl = 'jdbc: mysql: // localhost: 3306/phpdb'; % create an SQL connection conn = database (databasename, username, password, driver, databaseurl ); ping (conn); % connection determination: 1 connected | 0 not connected to isconnection (conn); % get data in cell format curs = exec (conn, 'select * from Maid. tb_dw_addr '); %' indicates the SQL statement curs = fetch (curs); datacell = curs. data; % close connection close (curs); close (conn)
Summary

I haven't written a blog for a long time. I will stay here now and in the future.Zhejiang University of Technology, Continue to likeCodeMore and more things will be learned to cheer for yourself.
I want to communicate with you, my email: wangrui_key@163.com

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.