I have a text file containing of a continuous signal 2 columns :
a) Time ranging from 12:35:57 to 16:35:57 (HH:MM:SS)
b) Numeric value
I want to plot 5 seconds
clear all
close all
data3=readtable ('PLETH.txt');
Date_Time = data3(:,1);
datecell=table2array(Date_Time);
load = data3(:,2);
A = table2array(load)

답변 (1개)

Neilabh Banzal
Neilabh Banzal 2020년 5월 4일
편집: Neilabh Banzal 2020년 5월 4일

0 개 추천

Hi,
You don't need to convert the table into array.
A simple
plot(data3.x, data3.y);
should work.
Here, x and y are your column labels.
This
plot(data3(:,1), data3(:,2));
should also work just fine.
Refer to Access Data in a Table for more details.

댓글 수: 2

I get this error.
Also, I want to plot only 5 seconds of the data.
Error in ppg (line 5)
plot(data3(:,1), data3(:,2))
Neilabh Banzal
Neilabh Banzal 2020년 5월 4일
Could you put up the complete code and the data file here?
It's difficult to debug without all the information.

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

카테고리

도움말 센터File Exchange에서 Visualization and Data Export에 대해 자세히 알아보기

제품

릴리스

R2020a

질문:

2020년 5월 4일

댓글:

2020년 5월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by