ThingSpeak Channel Table Error

조회 수: 4 (최근 30일)
Joseph Tong
Joseph Tong 2020년 12월 6일
댓글: Christopher Stapels 2024년 4월 5일
Hi everyone,
I am having issues with my ThingSpeak Channel only displaying certain portion of my table. When I run the visualization code on its own, I get the full table as shown here:
However, when I refresh the page to check the ThingSpeak channel, only the last row of the table is displayed.
I have tried to adjust the Display Settings on the Visualization side, but I am still getting the same issue. I have attached my code to the bottom of this post for any clarity.
Any help would be appreciated!
  댓글 수: 5
Frederic FERRIEU
Frederic FERRIEU 2024년 4월 5일
%'DateRange',[startDate endDate]
myData= thingSpeakRead( readChannelID,...
'Fields', [3, 1],'DateRange',[startDate endDate]);
% Read Data other reading
disp(myData)
myData = thingSpeakRead( readChannelID,...
'Fields', [6, 1],'NumPoints',[12]);
disp(myData)
TString = evalc('disp(myData)');
TString = strrep(TString,'<strong>','\bf');
TString = strrep(TString,'</strong>','\rm');
TString = strrep(TString,'_','\_');
FixedWidth = get(0,'FixedWidthFontName');
% Output the table using the annotation command.
annotation(gcf,'Textbox','String',TString, ...
'Interpreter','Tex',...
'FontName',FixedWidth,...
'Units','Normalized',...
'Position',[0 0 1.5 1],'FontSize',7);
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN 268.6447
Christopher Stapels
Christopher Stapels 2024년 4월 5일
@frederic can you make a new post with your issue? It seems different than the OP.

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

채택된 답변

Christopher Stapels
Christopher Stapels 2020년 12월 7일
편집: Christopher Stapels 2020년 12월 7일
I suggest using a timetable. The uitable element is really not right for ThingSpeak.
dataTimeTable = ...
thingSpeakRead(channelId, 'OutputFormat','TimeTable','NumPoints',3,'ReadKey',readAPIKey)
Then use the second suggestion in this answer.
I did it for some traffic monitor data.
myCarData = thingSpeakRead( 38629,'numpoints',3,'outputFormat','TimeTable' );
TString = evalc('disp(myCarData)');
TString = strrep(TString,'<strong>','\bf');
TString = strrep(TString,'</strong>','\rm');
TString = strrep(TString,'_','\_');
FixedWidth = get(0,'FixedWidthFontName');
% Output the table using the annotation command.
annotation(gcf,'Textbox','String',TString,'Interpreter','Tex',...
'FontName',FixedWidth,'Units','Normalized','Position',[0 0 1.5 1],'FontSize',7);
I had to change the font size to get thigns to fit due to the long field names. You might be able to make that larger.
  댓글 수: 1
Frederic FERRIEU
Frederic FERRIEU 2024년 4월 5일
ok let me see just discover your answer now... thats why i sent this last message... by the way in matlab why the fontsize is always so tiny... with my laptop yoga 14" i need to use a microscope to read the menu options.....

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

추가 답변 (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