Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: RunExperiment.m
- Revision:
- 3:ba19438ac09e
- Parent:
- 2:ccafe893ef50
--- a/RunExperiment.m Wed Sep 09 23:19:10 2015 -0400 +++ b/RunExperiment.m Thu Sep 10 12:00:44 2015 -0400 @@ -18,7 +18,7 @@ % OUTPUT PARAMETERS % output: (float vector) matrix of all data recieved from FRDM % board during the experiment - + if nargin == 4 params = struct(); end @@ -29,7 +29,8 @@ if ~isfield(params,'timeout') params.timeout = 2; end - + + done = 0; data = []; % output data @@ -60,7 +61,7 @@ data(end+1 : end+num_data,:) = d; if (has_callback) - callback(d); + params.callback(d); end end @@ -94,7 +95,7 @@ if d > pd pk = k; pd = d; - elseif (k-pk) > params.timeout/10 + elseif (k-pk) > params.timeout*10 break end