I've been trying to plot the iris data points of each combination of two dimensions of the four dimension dataset which contains the sepal length, sepal width, petal length and petal width. I tried to follow the documentation written in Fuzzy C-Means Clustering for Iris Data though, I've been getting errors such as 'Error using load Unknown text on line number 1 of ASCII file iris.dat "Iris-setosa".' when I tried to type load iris.dat in the command window.
This is what I've written so far:
iris = readtable('iris.dat');
setosa = iris(1:50,:);
versicolor = iris(51:100,:);
virginica = iris(101:150,:);
obsv_n = size(iris, 1);
Characteristics = {'sepal length','sepal width','petal length','petal width'};
pairs = [1 2; 1 3; 1 4; 2 3; 2 4; 3 4];
h = figure;
for j = 1:6
x = pairs(j, 1);
y = pairs(j, 2);
subplot(2,3,j);
plot([setosa(:,x) versicolor(:,x) virginica(:,x)],[setosa(:,y) versicolor(:,y) virginica(:,y)], '.');
xlabel(Characteristics{x});
ylabel(Characteristics{y});
end
The only issue I have, is the line of the plot command which gives me 'Error using askisi1_5 (line 14) Duplicate table variable name: 'Var1'.'