No more plot although no errors

조회 수: 17 (최근 30일)
Peter Groh
Peter Groh 2017년 9월 28일
답변: Christopher Stapels 2017년 12월 14일
My Visualizations stopped displaying anything ( no plot) - it worked for months. Even taking the template "Create a 2-D line plot" I just get the the result " _ MATLAB code ran successfully_." and no error code in the output field - but still no plot.
Is there a problem with connecting to thingspeak or what has changed?
.
Here the simple code from the template:
% Template MATLAB code for visualizing data from a channel as a 2D line
% plot using THINGSPEAKPLOT function.
% Prior to running this MATLAB code template, assign the channel ID to read
% data from to the 'readChannelID' variable. Also, assign the field ID
% within the channel that you want to read data from to plot.
% TODO - Replace the [] with channel ID to read data from:
readChannelID = [139311];
% TODO - Replace the [] with the Field ID to read data from:
fieldID1 = [5];
% Channel Read API Key
% If your channel is private, then enter the read API
% Key between the '' below:
readAPIKey = '';
%%Read Data %%
[data, time] = thingSpeakRead(readChannelID, 'Field', fieldID1, 'NumPoints', 30, 'ReadKey', readAPIKey);
%%Visualize Data %%
thingSpeakPlot(time, data);
  댓글 수: 1
Rik
Rik 2017년 9월 28일
Are data and time empty? The reason for the absence of a plot can most likely be found inside either thingSpeakRead or thingSpeakPlot.
Have a read here and here. It will greatly improve your chances of getting an answer.

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

채택된 답변

Christopher Stapels
Christopher Stapels 2017년 12월 14일
As of December 14, your channel has recent values in it. I think the NaN values between real values are making the plot scale unexpectedly. Try adding a LineSpec For example, plot(timeA,dataA,'ro-');

추가 답변 (0개)

커뮤니티

더 많은 답변 보기:  ThingSpeak 커뮤니티

카테고리

Help CenterFile Exchange에서 Visualize Data에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by