Quantcast
Channel: ThingSpeak IoT Community - All Forums
Viewing all articles
Browse latest Browse all 1833

wasted on thingSpeakRead table to uitable

$
0
0

Hey guys!

I am facing a problem inserting a table with my data from thingspeak to a matlab uitable in guide.

 

When I press a button, i run the following code to put the data into the uitable (created with guide before):

data = thingSpeakRead(<ChannelID>, 'DateRange',[datetime('Oct 27, 2016'),datetime('Nov 4, 2016')],'OutputFormat','table')

set(handles.uitable1,'Data',data);

 

and this is the result in the command window:

data =

Timestamps                      Fahrer       Kilometerstand      Fahrtgrund
____________________ _________ ______________ ________________

27-Oct-2016 18:15:25           0                   0                   'Initialisieren'
27-Oct-2016 18:17:01      217314240          0                   'Dienstfahrt'
27-Oct-2016 18:17:34           0                  13                  'Fahrtende'
27-Oct-2016 18:18:05      741914369         13                   'Analyse'
27-Oct-2016 18:18:36           0                  20                  'Fahrtende'

Error using matlab.ui.control.Table/set
While setting the 'Data' property of Table:
Data must be a numeric, logical, or cell array

Error in Test_Download>pushbutton1_Callback (line 82)
set(handles.uitable1,'Data',data);

Error in gui_mainfcn (line 95)
feval(varargin{:});

Error in Test_Download (line 42)
gui_mainfcn(gui_State, varargin{:});

Error in @(hObject,eventdata)Test_Download('pushbutton1_Callback',hObject,eventdata,guidata(hObject))

Error while evaluating UIControl Callback

When i don't use the 'OutputFormat','table'-Option in ThingSpeakRead it works, but then the timestamp and the last coloumn with the strings are missing. Which is bad, because they are necessary for my application.

I don't know how to access the datatypes properly to get everything running. Can anybody help me with this?

 

Thanks a lot! 


Viewing all articles
Browse latest Browse all 1833

Trending Articles