Showing posts with label Data Mining. Show all posts
Showing posts with label Data Mining. Show all posts

Thursday, 3 May 2012

Matlab Database Connectivity Example code



Databases is collection of structured data .Database actions are data manipulate,data deletion and data insertion. This action we do on Matlab.This action makes use following operational syntax.

1.Create Connection String

Connection String used to connect the database.That syntax as follows

conn_str = database('database_name','username','password','driver','database_url');

Example :

>>conn_str = database('my_db','scott','tiger','oracle.jdbc.driver.OracleDriver','jdbc:oracle:oci7:');

Here we create the connection string on Oracle database.Like you connect different type of  databases.

2.Execute Query String on Database

exec function to execute the query strings on database.Syntax as follows

curs = exec(conn_str, 'sql_query');

Example :

>>curs = exec(conn_str, 'Select * from My_Table');
 above example retrieve the all data's from My_Table.Like you do execute all type of sql queries.

3.Fetch the cursor to a MATLAB variable 

Here we convert the cursor data into matlab variable. example code as below

>>my_data = fetch(curs);

Finally my_data contain all data's of My_Table.

Related Search :  Matlab Database Connectivity Example code, Database connection matlab, Access database connection on matlab, Matlab oracle database connection.

Sunday, 8 April 2012

Matlab Predefined clustering Function | List of Matlab clustering Function



Clustering approach is Forming the groups of data from Large amount of data.In matlab contain lot of Predefined functions are there.That below we mention for you.It is very useful to you.

If you want to find cluster for Image means ,you have convert the matrix into one vector. Then apply below approaches.

Cluster Methods Predefined Function


Fuzzy C-Means Clustering fcm(data,k) k is groups
Hierarchical Clustering Y = pdist(data,'cityblock');

Z = linkage(Y,'average');

T = cluster(Z,'maxclust',3)

K-Means Clustering kmeans(data,K) k is groups


These above's are Predefined function.Here data is input data for each approach.


Related Search : Matlab Predefined clustering Function , List of Matlab clustering Function,K-Means Clustering matlab example,Fuzzy C means clustering matlab example,Hierarchical clustering matlab example.
Related Posts Plugin for WordPress, Blogger...