Hello, I can't see where my mistake is.
I have data (from a uitable) in whcih columns 2-6 are values I want to plot on 5 different subplots:
title={'# objects','centroid mean','centroid mode','FM','Q99'}n=size(data,1) %number of rows in my data table
X=linspace(1,n, n)for i=2:6 Y=data(:,i) if isa(Y,'cell') %if data is a cell array, then convert to ordinary data type.
Y=cell2mat(Y); end subplot(2,3,i-1) plot(X,Y,'r*--') grid set(gca,'fontsize',8) tl=title{i-1} class(tl) title(tl,'color','r')end
Im getting an error message (in the line title(tl,'color','r')) :
'Index in position 1 exceeds array bounds (must not exceed 1).'
Best Answer