Thursday 8 December 2011

Matlab Scatter Plot Example | Use Scatter Plot in Matlab

Scatter plot is one of the plot in matlab. scatter(x,y) this is the syntax on matlab for plotting scatter plot.This plot displays the colored circle in specified location of x,y.here x and y are vector,this vector must be same length.this plot use the parameters(properties) like as plot function.Properties are color,circle width and ect. Properties use as scatter(...,'PropertyName',propertyvalue) this syntax.
This plot mainly use in cluster grouping and cluster spiting also use in classification section also.

syntax : scatter(X,Y)


X,Y must be same length vector ,following example shows the scatter plot.


>> x = rand(10,1);
>> y = rand(10,1);

>> scatter(x,y);


x and y variables are generate randomly, that size is 10 row with 1 columns, finally we use plot function "Scatter" used to plot the x and y values. the output as below,





Kindly Bookmark and Share it:

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...