Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
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 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Jacky Jo
2016년 3월 31일
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
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!