How to select the length

조회 수: 3 (최근 30일)
Sofia Santos
Sofia Santos 2020년 5월 11일
댓글: Sofia Santos 2020년 5월 11일
Hello!!
I have some values in a text file and I just want the values ​​up to the 10000 th position, so I choosed the length, N, 10000. I don't know how to choose the values of EDA just until 10000, because the length (EDA)=14000.
Thank you very much!
data_org = importdata('signal.txt','\t',7); %text file with 7 columms
EDA=data_org.data;
EDA= EDA(:,6); %I only want the values in column 6
N = 10000;
fs = 1000;
T=N/fs;
t = (1:N)/fs;
f = (1:N)/T;
plot(t,EDA); %wrong because the length have to be the same
  댓글 수: 2
Walter Roberson
Walter Roberson 2020년 5월 11일
N = 10000;
EDA=data_org.data;
EDA = EDA(1:N,6);
Sofia Santos
Sofia Santos 2020년 5월 11일
Thank you!!!

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by