clear all;
clear m;
m = mobiledev;
m.Logging = 1;
pause(2);
m.Logging = 0;
pic=imread('1.jpg');
image(pic);
pause(2);
[ac, tac] = accellog(m);
x = ac(:,1);
f=max(x);
pause(2);
disp(max(x));
if max(x)>10
pic=imread('1.1.jpg');
image(pic);
pause(0.5);
if max(x)>24
pic=imread('2.2.jpg');
image(pic);
pause(0.5);
if max(x)>35
pic=imread('33.jpg');
image(pic);
pause(0.5);
if max(x)>42
pic=imread('44.jpg');
image(pic);
pause(0.5);
end
end
end
end
assignin('base','d',f);
load_system('aaa'); %進入simulink再傳回
sim('aaa');
b=max(a);
if b==1
pic=imread('2.jpg');
image(pic);
pause(2);
elseif b==2
pic=imread('3.jpg');
image(pic);
pause(2);
elseif b==3
pic=imread('images.jpg');
image(pic);
pause(2);
elseif b==4
pic=imread('4.jpg');
image(pic);
pause(2);
elseif b==5
clear all;
end