MATLAB: I want to plot 5 rows from a dataset (125*694). each row must be plot one by one. means 1st row wll be plot in Y-Axis 0-694 then 695-1388 then 1389-2082 every time the n value is incresed by 2,3,4,5 order,.

columnplotrow

a = dlmread('EtLAPV_TextData_Class5.txt'); [m1,n1]=size(a); a=a(:,1:n1-1); i=(a(1,:)); plot(i) hold on j=(a(2,:)); plot (j) hold on k=(a(3,:)); plot(k) hold on l=(a(4,:)); plot(l) hold on m=(a(5,:)); plot(m) hold on title('Electrode Response') xlabel('Measurement points'); ylabel('Response'); after written this code this figure is coming
But i want this should look like these one

Best Answer

y = reshape(M(1:5,:).',[],1);
x = (1:5*694).';
plot(x,y,'b-')
Related Question