So im making a program that uses my android phone to collect data and plot it. While evaluating the code, an error pops up about line 55. The command is pause (15)

1 vue (au cours des 30 derniers jours)
m = mobiledev
m.AngularVelocitySensorEnabled = 1;
m.OrientationSensorEnabled = 1;
m.Logging = 1;
pause(15)
m.Logging = 0;
[av, tav] = angvellog(m);
[o, to] = orientlog(m);
yAngVel = av(:,2);
roll = o(:, 3);
plot(tav, yAngVel, to, roll);
legend('Y Angular Velocity', 'Roll');
xlabel('Relative time (s)');
tInit = datetime(m.InitialTimestamp, 'InputFormat', 'dd-MM-yyyy HH:mm:ss.SSS');
tAngVel = tInit + seconds(tav);
tOrient = tInit + seconds(to);
yAngVelDeg = yAngVel * 180/pi;
plot(tAngVel, yAngVelDeg, tOrient, roll);
legend('Y Angular Velocity', 'Roll');
xlabel('Absolute time (s)');
m.AngularVelocitySensorEnabled = 0;
m.OrientationSensorEnabled = 0;
clear m;
  4 commentaires
Ryan Leonard
Ryan Leonard le 12 Mar 2018
Yes. I'm trying to have it collect data for 15 seconds

Connectez-vous pour commenter.

Réponses (1)

Walter Roberson
Walter Roberson le 12 Mar 2018
for K = 1 : 5; pause(3); end
That is, the message seems to be saying that you can only pause() up to 3 at a time.

Catégories

En savoir plus sur MATLAB Mobile dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by