sir, I have tried with small size number (to repeat after multiple of 9 for 100 data sets. But still I have not get it. 1. how each x(i)and y(i) value gets its value. I expect a triangular shape with touching x at 1 9 18 29 etc thanks
y=[1 2 3 4 5 4 3 2 1]
x=[1 2 3 4 5 6 7 8 9]
xn=ones(1,100);
j = 1;
for i = 1:length(xn)
if(j==10)
j = 1;
end
if i<=5
y(i)=i;
else
y(i)=y(5)-y(i-5);
end
j = j+1;
plot(x(i), y(j));
end
error
Index exceeds matrix dimensions.