% Template MATLAB code for visualizing correlated data using the % SCATTER function. % zf190728.1213 % Prior to running this MATLAB code template, assign the channel variables. % Set 'readChannelID' to the channel ID of the channel to read from. % Also, assign the read field IDs to the variables 'fieldID1', and 'fieldID2'. % Replace the [] with channel ID to read data from: readChannelID = []]; fieldID1 = 1; fieldID2 = 2; fieldID3 = 3; % Channel Read API Key % If your channel is private, then enter the read API % Key between the '' below: readAPIKey = ''; %% Read Data %% nbMesures = 200 % Read 1 data variable [data1, time1] = thingSpeakRead(readChannelID, 'Field', fieldID1, 'NumPoints', nbMesures, 'ReadKey', readAPIKey); % Read 2 data variable [data2, time2] = thingSpeakRead(readChannelID, 'Field', fieldID2, 'NumPoints', nbMesures, 'ReadKey', readAPIKey); % Read 3 data variable [data3, time3] = thingSpeakRead(readChannelID, 'Field', fieldID3, 'NumPoints', nbMesures, 'ReadKey', readAPIKey); %% Visualize Data %% plot(time1,data1, time2,data2, time3,data3); legend({'Tint 1er','Text sud','Text nord'}); xlabel('Time (GMT ! )'); ylabel('Temperature °C'); title('Mesures température 1023 Crissier');