필터 지우기
필터 지우기

Help in Plotting ECG .csv file

조회 수: 20 (최근 30일)
vandana sharma
vandana sharma 2019년 2월 26일
댓글: vandana sharma 2019년 2월 26일
A=readtable('samples.csv');
figure;
x= A{:,1};
y= A{:,2};
plot(x,y);
xlim([2,21601]);
ylim([2,14761]);
  댓글 수: 11
Stephan
Stephan 2019년 2월 26일
@Madhan: I tried using readtable and get the same error - if i use csvread it works - there is problably not a problem of a shadowed function
madhan ravi
madhan ravi 2019년 2월 26일
편집: madhan ravi 2019년 2월 26일
So after testing it , turns out that all the numbers are read as char.

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

채택된 답변

Stephan
Stephan 2019년 2월 26일
편집: Stephan 2019년 2월 26일
Hi,
try this:
A=csvread('samples.csv',2,0);
plot(A(:,1),A(:,2))
For me it works - there is no problem with your plot function i guess. It is due to the format that the readtable function gives your data when inporting it. I get the same error when i try to use readable... So do not search for a double file that is not there...
Best regards
Stephan
  댓글 수: 3
Stephan
Stephan 2019년 2월 26일
편집: Stephan 2019년 2월 26일
The first two rows are ignored and no columns are ignored when importing the data - so the imported data is only numeric, which is easier to process with.
vandana sharma
vandana sharma 2019년 2월 26일
ok.
Thank you so much Stephan.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spectral Estimation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by