GABRIEL NICOLAU in MATLAB Answers
上次活动时间: 2021-11-20

Hi, I am trying to send ECG datd to ThingSpeak, however, at one sample per 15seconds it is rather useless when I have 650k samples. What I want to do is send a certain amount of samples before and after each R peak (I am usung find peaks to locate R-peaks after filtering the data). That way I can reduce the amount of samples sent and get more ECG signals inside the graph. Can anyone advise? PS - Patient 101 is data from MIT database. Thank you in advance! Gabriel N. Nicolau My current code is below: % clc % clear all % close all %load ( 'patient100.csv'); dat=csvread('patient100.csv'); figure; subplot(4,1,1) plot(dat) findpeaks(dat,'MinPeakHeight',0.5,'MinPeakDistance',200); title('Original') x=lowpass(dat,15,360); y=highpass(x,10,360); subplot(4,1,2) plot(x) findpeaks(x,'MinPeakHeight',0.5,'MinPeakDistance',200); title('Low-Pass') subplot(4,1,3) plot(y) findpeaks(y,'MinPeakHeight',0.3,'MinPeakDistance',200); title('High-Pass') y_diff=diff(y); y_abs = y_diff.^2; subplot(4,1,4) plot(y_abs); %for i=1: 1/length(dat)*100000: length(dat)*10000+ 1/length(dat)*100000; %t=dat(dat(i)>dat(i+1)); %end yy = y'; %%% DATA TO BE SENT TO THINGSPEAK CHANNEL a = yy; b = 0; c = 650000; x = [a]; chId = 622307; writeKey = 'XXXYYYZZZ'; tOut = 99999999; % tStamps = [datetime('now')-minutes(899):minutes(1):datetime('now')]'; for i = 1:c pause(15) b = x(i) thingSpeakWrite(chId,[b],'WriteKey',writeKey) end
Sai Pavan Nunna in MATLAB Answers
上次活动时间: 2020-2-8

Can anyone share with the code on how to plot ECG sensor data into ECG graph using Matlab visualization in Thingspeak. I am able to do using Processing IDE.I want to do the same in Thingspeak. Teh processing code is https://github.com/sparkfun/AD8232_Heart_Rate_Monitor. I want the equivalent matlab code. I am not able to get the equivalent. Please someone help me.

关于 ThingSpeak

The community for students, researchers, and engineers looking to use MATLAB, Simulink, and ThingSpeak for Internet of Things applications. You can find the latest ThingSpeak news, tutorials to jump-start your next IoT project, and a forum to engage in a discussion on your latest cloud-based project. You can see answers to problems other users have solved and share how you solved a problem.