Info

此问题已关闭。 请重新打开它进行编辑或回答。

I get unexpected matlab expression when executing the follwoing

2 次查看(过去 30 天)
Hello Am a Matlab newbie so this question maybe a bit too simple. I am trying to run the following code - I get the error at the uncomented section at the end marked with "***" * [d,t] = thingSpeakFetch(6, 200 ,10.... 'URL','http://192.168.70.128:3000'); % plot(t,d(:,1),t,d(:,2),t,d(:,3)) %
Function [ data, timestamps, channelInfo, diagInfo ] = thingSpeakFetch( channelID, varargin ) %thingSpeakFetch Read data stored on ThingSpeak servers % % Syntax % ------ % data = thingSpeakFetch(channelID) % data = thingSpeakFetch(channelID,apiKey) % [data,timestamps,channelInfo,diagInfo] = thingSpeakFetch() % [__] = thingSpeakFetch(,Name,Value) % % Description % ------------ % data = thingSpeakFetch(channelID) reads the most recent data from % all fields of the specified public channel on ThingSpeak.com. % % data = thingSpeakFetch(channelID,apiKey) reads the most recent data on a % private channel using the read API key. % % The number of points returned is always % limited to a maximum of 8000 by the % ThingSpeak.com server. If you hit the % limit you may need to adjust your ranges % and make multiple calls, as needed. % % DateRange cannot be used with: % - NumPoints % - NumDays % % % % Example 1 % % --------- % % Retrieve the most recent result for all Fields of a % % private channel. d = thingSpeakFetch(1, 'CDUCPZGC0CR7D2Z3') % % % Example 2 % % --------- % % Retrieve the most recent result for all Fields of a % % public channel including the timestamp. % [d,t] = thingSpeakFetch(6815) %
% % Example 3 % % --------- % % Retrieve the data for September 8, 2013 through September 12, 2013 for % % Field 4 of a public channel, including the timestamp, and % % channel information. % [d,t,ci] = ... % thingSpeakFetch(6815,'Field',4,'DateRange',{'09/08/2013','09/12/2013'}); % % % Example 4 % % --------- % % Retrieve the last 10 points for all three Fields of a % % public channel on a private ThingSpeak server installation and plot % % data vs. timestamps. * [d,t] = thingSpeakFetch(6, 200 ,10.... 'URL','http://192.168.70.128:3000'); % plot(t,d(:,1),t,d(:,2),t,d(:,3)) % % % 1. https://github.com/iobridge/ThingSpeak % % See also DATESTR, URLREAD, XMLREAD, PLOT

回答(1 个)

syed
syed 2015-2-12
I tried various combinations ie with and without .... but get the same error. The original program "thingspeakfetch.m" was downloaded and modified to use a private thingspeakserver using channel 1. I am merely trying to run some simple tests but keep running intot his issue.
  1 个评论
Star Strider
Star Strider 2015-2-12
It’s likely best for you to contact the author of that program. There could be MATLAB version differences between the version you’re using and the version it was written in.
I’m deleting my Answer, since it didn’t solve the problem.

社区

更多回答在  ThingSpeak Community

Community Treasure Hunt

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

Start Hunting!

Translated by