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

Have a piece of advice for Purdue students? Share it through Rhea!

Alumni Liaison