Info
This question is closed. Reopen it to edit or answer.
How to plot 5 rows from a dataset? My dataset size is 125*694. I have to plot 5 rows from there so total 5*694(3470) data point.. Whenever i have plotted this each row placed above of another row. X axis range should be 0-3500 but it shown 0-700
1 view (last 30 days)
Show older comments
a = dlmread('EtLAPV_TextData_Class8.txt');
[m n]=size(a);
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');
I think there will be some sort of editing by which i can plot these rows only vertically !! Thanks in advance
0 Comments
Answers (1)
Jacky Jo
on 31 Mar 2016
try the following:
a= randn(125,694); % change the randn(125,694)) by dlmread('EtLAPV_TextData_Class8.txt')
new_a=a(1:5,:); % took only first five rows.
new_a=new_a'; % interchange the row with col.
new_a=new_a(:) % make it a col. matrix/ vecor.
plot(new_a)
title('Electrode Response')
xlabel('Measurement points');
ylabel('Response');
0 Comments
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!