(New page: This is a stub for Matlab related issues. Please create topics about Matlab as sub-topics of this.)
 
(Help on how to include Matlab code.)
 
Line 1: Line 1:
 
This is a stub for Matlab related issues. Please create topics about Matlab as sub-topics of this.
 
This is a stub for Matlab related issues. Please create topics about Matlab as sub-topics of this.
 +
 +
To include Matlab source, use the <nowiki><source lang="Matlab></nowiki> tag...
 +
 +
e.g. to produce
 +
 +
<source lang="matlab">
 +
function [data labels] = loadIris()
 +
% I use a slightly different arrangement than the Matlab default.
 +
% The columns of data are vectors from the data-set
 +
% labels is a column vector with "1", "2", or "3" instead of the flower
 +
% name.
 +
load fisheriris meas
 +
data = meas';
 +
 +
labels = (1:3);
 +
labels = labels(ones(50,1),:);
 +
labels = labels(:);
 +
</source>
 +
 +
You should use
 +
 +
<pre>
 +
<source lang="matlab">
 +
function [data labels] = loadIris()
 +
% I use a slightly different arrangement than the Matlab default.
 +
% The columns of data are vectors from the data-set
 +
% labels is a column vector with "1", "2", or "3" instead of the flower
 +
% name.
 +
load fisheriris meas
 +
data = meas';
 +
 +
labels = (1:3);
 +
labels = labels(ones(50,1),:);
 +
labels = labels(:);
 +
</source>
 +
</pre>

Latest revision as of 15:04, 7 April 2008

This is a stub for Matlab related issues. Please create topics about Matlab as sub-topics of this.

To include Matlab source, use the <source lang="Matlab> tag...

e.g. to produce

function [data labels] = loadIris()
% I use a slightly different arrangement than the Matlab default.
% The columns of data are vectors from the data-set
% labels is a column vector with "1", "2", or "3" instead of the flower
% name.
 load fisheriris meas
 data = meas';
 
 labels = (1:3);
 labels = labels(ones(50,1),:);
 labels = labels(:);

You should use

<source lang="matlab">
function [data labels] = loadIris()
% I use a slightly different arrangement than the Matlab default.
% The columns of data are vectors from the data-set
% labels is a column vector with "1", "2", or "3" instead of the flower
% name.
 load fisheriris meas
 data = meas';

 labels = (1:3);
 labels = labels(ones(50,1),:);
 labels = labels(:);
</source>

Alumni Liaison

Ph.D. 2007, working on developing cool imaging technologies for digital cameras, camera phones, and video surveillance cameras.

Buyue Zhang