Wednesday, April 26, 2017

[ThingSpeak / MATLAB Visualizations] Convert pressure from pascals to mmHg



channelID = 1; % TODO
fieldID = 1; % TODO
readAPIKey = 'XXXXXXXXXXXXXXXXX'; % TODO

[data, time] = thingSpeakRead(channelID, 'Fields', fieldID, 'NumDays', 1, 'ReadKey', readAPIKey);

factor = 760 / 101325;
data = data .* factor;

data = round(data);

thingSpeakPlot(time, data);

No comments:

Post a Comment