{"id":2905,"date":"2014-10-06T10:00:16","date_gmt":"2014-10-06T15:00:16","guid":{"rendered":"https:\/\/blogs.mathworks.com\/community\/?p=2905"},"modified":"2016-11-28T09:58:54","modified_gmt":"2016-11-28T14:58:54","slug":"acquire-data-from-device-sensors-with-matlab-mobile","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/community\/2014\/10\/06\/acquire-data-from-device-sensors-with-matlab-mobile\/","title":{"rendered":"Acquire Data from Android Device Sensors with MATLAB Mobile"},"content":{"rendered":"<div class=\"content\">\r\n\r\n<!--introduction-->With the new MATLAB\u00ae Support Package for Android\u2122 Sensors, you can now use MATLAB Mobile\u2122 to acquire data from the sensors on your Android device. This data can be sent to a MATLAB session running on your computer for further analysis and visualization.<!--\/introduction-->\r\n<h3>Contents<\/h3>\r\n<div>\r\n<ul>\r\n\t<li><a href=\"#505c61c6-9655-4d70-a355-38c644446c75\">What data, you ask?<\/a><\/li>\r\n\t<li><a href=\"#6d20fd1b-d9a9-4cff-a5ab-16389ebb45d9\">Viewing Sensor Data<\/a><\/li>\r\n\t<li><a href=\"#fd5c5cee-581e-4884-9282-651068d295ea\">Analyze Data with MATLAB<\/a><\/li>\r\n\t<li><a href=\"#532167fb-8761-4812-a747-678ac1400955\">Example: Counting Steps by Capturing Acceleration Data<\/a><\/li>\r\n\t<li><a href=\"#c8483ca5-309e-413e-8a65-f9e7b4ba0f75\">Try it out!<\/a><\/li>\r\n<\/ul>\r\n<\/div>\r\n<h4>What data, you ask?<a name=\"505c61c6-9655-4d70-a355-38c644446c75\"><\/a><\/h4>\r\nOn Android devices, MATLAB Mobile supports data acquisition from motion sensors like the accelerometer as well as positional sensors like the GPS. A list of all sensors is shown below.\r\n<p style=\"text-align: center;\"><a href=\"https:\/\/blogs.mathworks.com\/community\/files\/List_of_Sensors.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-2922\" alt=\"List of Supported Sensors in MATLAB Mobile\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/List_of_Sensors.png\" width=\"598\" height=\"177\" \/><\/a><\/p>\r\n\r\n<h4><span style=\"font-size: 1em;\">Viewing Sensor Data<\/span><\/h4>\r\n<h4><a name=\"6d20fd1b-d9a9-4cff-a5ab-16389ebb45d9\"><\/a><\/h4>\r\nYou can access these sensors by selecting the <i>Sensors<\/i> option from the drop-down menu in MATLAB Mobile. You can tap on a sensor to enable it and view related measurements. The screenshot below is the result of turning on the Accelerometer and Magnetometer.\r\n<br>\r\n<p style=\"text-align: center;\"><a href=\"https:\/\/blogs.mathworks.com\/community\/files\/Sensors_Acc_Mag.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-2929\" alt=\"Acceleration and Magnetic Field\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/Sensors_Acc_Mag.png\" width=\"281\" height=\"468\" \/><\/a><\/p>\r\n<h4>Analyze Data with MATLAB<a name=\"fd5c5cee-581e-4884-9282-651068d295ea\"><\/a><\/h4>\r\nDisplaying this data is cool, but to make this truly useful, you will want to perform further analysis and processing. Fortunately, the MATLAB Support Package for Android Sensors helps you do just that! It enables you to send sensor data to a MATLAB session on your computer. To do this:\r\n<br>\r\n<br>\r\n<div>\r\n<ul>\r\n\t<li>Connect MATLAB Mobile to your computer with the MATLAB Connector. This feature is only supported on MATLAB R2014a and later, so make sure you are on a compatible version.<\/li>\r\n&nbsp;\r\n\t<li>Install the MATLAB Support Package for Android Sensors. Choose <i>Add-ons<\/i> from the MATLAB Toolstrip, and then choose <i>Get Hardware Support Packages<\/i>. This will open the support package installer. Choose <i>Android Sensors<\/i> from the list and follow the instructions.<\/li>\r\n&nbsp;\r\n\t<li>To establish communication between the sensors on your device and MATLAB, create a mobiledev object, as follows:<\/li>\r\n<\/ul>\r\n<\/div>\r\n<pre class=\"codeinput\">m = mobiledev;<\/pre>\r\n<h4>Example: Counting Steps by Capturing Acceleration Data<a name=\"532167fb-8761-4812-a747-678ac1400955\"><\/a><\/h4>\r\nThe mobiledev object facilitates communication between the sensors on your Android device and the MATLAB session running on your computer. Let\u2019s explore this workflow through an example that illustrates the collection of acceleration data and using it to count the number of steps taken.\r\n\r\n<br><br><b>Step 1: Turn on the Accelerometer<\/b>\r\n\r\n<br>Once you have completed the 3 steps from the above section, go to MATLAB Mobile and turn on the accelerometer. You should see something akin to this:<br>\r\n\r\n<p style=\"text-align: center;\"><a href=\"https:\/\/blogs.mathworks.com\/community\/files\/Sensors_Acc.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-2928\" alt=\"Acceleration\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/Sensors_Acc.png\" width=\"279\" height=\"467\" \/><\/a><\/p>\r\n<br>\r\nYou can also enable the sensor directly from MATLAB, by executing the following command:\r\n<pre class=\"codeinput\">m.AccelerationSensorEnabled = 1;<\/pre>\r\n<b>Step 2: Send Data to MATLAB<\/b>\r\n\r\n<br>Did you notice the enabled <i>Start Sending<\/i> button towards the bottom of your screen? Tap on it, and voila! You are now sending data to MATLAB.\r\n\r\nAlternatively, you can start sending data directly from MATLAB, through the following command:\r\n<pre class=\"codeinput\">m.Logging = 1;<\/pre>\r\nYou can verify this in MATLAB, note the Current Sensor Values in the result:\r\n<pre class=\"codeinput\">m<\/pre>\r\n<pre class=\"codeoutput\">m = \r\n\r\nmobiledev with properties:\r\n\r\n                   Connected: 1\r\n                     Logging: 1\r\n            InitialTimestamp: '02-Oct-2014 21:53:26.707'\r\n\r\n   AccelerationSensorEnabled: 1    (20 Logged values)\r\nAngularVelocitySensorEnabled: 0\r\n       MagneticSensorEnabled: 0\r\n    OrientationSensorEnabled: 0\r\n       PositionSensorEnabled: 0\r\n\r\nCurrent Sensor Values:\r\n                Acceleration: [0.2631 5.9226 8.1850] (m\/s^2)<\/pre>\r\n<b>Step 3: Stop Acquiring Data and Retrieve Logs<\/b>\r\n\r\n<br>Walk around your campus\/home\/floor with your device. Once you are satisfied, stop sending this data to MATLAB. You can either tap on the <i>Stop Sending<\/i> button on MATLAB Mobile, or issue the following command in MATLAB:\r\n<pre class=\"codeinput\">m.Logging = 0;<\/pre>\r\nTo retrieve the data, use the accellog variable:\r\n<pre class=\"codeinput\">[a, t] = accellog(m);<\/pre>\r\n<b>Step 4: Plot Raw Sensor Data<\/b>\r\n\r\n<br>Once you have retrieved the logged acceleration data, you can plot it in MATLAB:\r\n<pre class=\"codeinput\">plot(t, a);\r\nlegend(<span class=\"string\">'X'<\/span>, <span class=\"string\">'Y'<\/span>, <span class=\"string\">'Z'<\/span>);\r\nxlabel(<span class=\"string\">'Relative time (s)'<\/span>);\r\nylabel(<span class=\"string\">'Acceleration (m\/s^2)'<\/span>);<\/pre>\r\n<p style=\"text-align: center;\"><a href=\"https:\/\/blogs.mathworks.com\/community\/files\/matlab_mobile_sensors_01.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-2924\" title=\"Raw Acceleration Data\" alt=\"matlab_mobile_sensors_01\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/matlab_mobile_sensors_01.png\" width=\"560\" height=\"420\" \/><\/a><\/p>\r\n<br>\r\nCalculate the magnitude to convert your X, Y and Z vectors to scalar values. Then, plot it.\r\n<pre class=\"codeinput\">x = a(:,1);\r\ny = a(:,2);\r\nz = a(:,3);\r\n\r\n<span class=\"comment\">% Calculate and plot magnitude.<\/span>\r\nmag = sqrt(sum(x.^2 + y.^2 + z.^2, 2));\r\nplot(t, mag);\r\nxlabel(<span class=\"string\">'Time (s)'<\/span>);\r\nylabel(<span class=\"string\">'Acceleration (m\/s^2)'<\/span>);<\/pre>\r\n<p style=\"text-align: center;\"><a href=\"https:\/\/blogs.mathworks.com\/community\/files\/matlab_mobile_sensors_02.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-2925\" alt=\"Acceleration Magnitude Plot\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/matlab_mobile_sensors_02.png\" width=\"560\" height=\"420\" \/><\/a><\/p>\r\n<br>\r\nTo remove constant effects such as gravity, you can subtract the mean from this data.\r\n<pre class=\"codeinput\"><span class=\"comment\">% Accounting for gravity.<\/span>\r\nmagNoG = mag - mean(mag);\r\n\r\n<span class=\"comment\">% Plot magnitude.<\/span>\r\nplot(t, magNoG);\r\nxlabel(<span class=\"string\">'Time (s)'<\/span>);\r\nylabel(<span class=\"string\">'Acceleration (m\/s^2)'<\/span>);<\/pre>\r\n<p style=\"text-align: center;\"><a href=\"https:\/\/blogs.mathworks.com\/community\/files\/matlab_mobile_sensors_03.png\"><img decoding=\"async\" loading=\"lazy\" width=\"560\" height=\"420\" class=\"aligncenter size-medium wp-image-2926\" alt=\"Acceleration Magnitude Plot (Gravity Removed)\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/matlab_mobile_sensors_03.png\" \/><\/a><\/p>\r\n<br>\r\nThe plotted data is now centered on zero, and shows peaks which correspond to a step taken while walking.\r\n<br>\r\n<br><b>Step 5: Count Number of Steps Taken<\/b>\r\n\r\n<br>To determine the number of steps taken, you can use to FINDPEAKS function from Signal Processing Toolbox. In this example, we are treating only peaks with a minimum height above one standard deviation as a step. This threshold should be tuned experimentally to match a person\u2019s level of movement while walking, hardness of floor surfaces etc.\r\n<pre class=\"codeinput\"><span class=\"comment\">% Use FINDPEAKS to determine the local maxima.<\/span>\r\nminPeakHeight = std(magNoG);\r\n[pks, locs] = findpeaks(magNoG, <span class=\"string\">'MINPEAKHEIGHT'<\/span>, minPeakHeight);<\/pre>\r\nThe number of steps taken is the number of peaks:\r\n<pre class=\"codeinput\">numSteps = numel(pks)<\/pre>\r\n<pre class=\"codeoutput\">numSteps =\r\n\r\n    15<\/pre>\r\nFinally, you can also identify these locations on your plot of acceleration magnitude data:\r\n<pre class=\"codeinput\">hold <span class=\"string\">on<\/span>;\r\n\r\n<span class=\"comment\">% Place a red marker on the locations that correspond to peaks.<\/span>\r\nplot(t(locs), pks, <span class=\"string\">'r'<\/span>, <span class=\"string\">'Marker'<\/span>, <span class=\"string\">'v'<\/span>, <span class=\"string\">'LineStyle'<\/span>, <span class=\"string\">'none'<\/span>);\r\ntitle(<span class=\"string\">'Counting Steps'<\/span>);\r\nxlabel(<span class=\"string\">'Time (s)'<\/span>);\r\nylabel(<span class=\"string\">'Acceleration Magnitude, Gravity Removed (m\/s^2)'<\/span>);\r\nhold <span class=\"string\">off<\/span>;<\/pre>\r\n<p style=\"text-align: center;\"><a href=\"https:\/\/blogs.mathworks.com\/community\/files\/matlab_mobile_sensors_04.png\"><img decoding=\"async\" loading=\"lazy\" width=\"560\" height=\"420\" class=\"aligncenter size-medium wp-image-2927\" alt=\"Acceleration Magnitude Plot (With Peaks)\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/matlab_mobile_sensors_04.png\" \/><\/a><\/p>\r\n<br>\r\n<b>Step 6: Clean Up<\/b>\r\n\r\n<br>Once you are done, make sure you turn off the acceleration sensor and clear the mobiledev object.\r\n<pre class=\"codeinput\">m.AccelerationSensorEnabled = 0;\r\nclear <span class=\"string\">m<\/span>;<\/pre>\r\n<h4>Try it out!<a name=\"c8483ca5-309e-413e-8a65-f9e7b4ba0f75\"><\/a><\/h4>\r\nTo learn more about acquiring data from sensors on your mobile device, refer to the following links:\r\n<br><br>\r\n<ul>\r\n\t<li><a href=\"#acquiring_data_from_sensors\">Acquiring Data from Sensors - MATLAB Mobile<\/a><\/li>&nbsp;\r\n\t<li><a href=\"https:\/\/www.mathworks.com\/hardware-support\/android-sensor.html\">Android Sensor Support from MATLAB<\/a><\/li>&nbsp;\r\n\t<li><a href=\"\">Documentation for mobiledev Object<\/a><\/li>\r\n<\/ul>\r\nWhat data are you acquiring, and what insights are you gaining from your analysis of that data? <br><br>Let us know by leaving a comment below.\r\n\r\n<script type=\"text\/javascript\" language=\"JavaScript\">\/\/ <![CDATA[\r\nfunction grabCode_41c070f63661497a97f50a0f6a0faf5a() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='41c070f63661497a97f50a0f6a0faf5a ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 41c070f63661497a97f50a0f6a0faf5a';\r\n\r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n\r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        copyright = 'Copyright 2014 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add copyright line at the bottom if specified.\r\n        if (copyright.length > 0) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\\n');\r\n\r\n        d.title = title + ' (MATLAB code)';\r\n        d.close();\r\n    }\r\n\/\/ ]]><\/script>\r\n<p style=\"text-align: right; font-size: xx-small; font-weight: lighter; font-style: italic; color: gray;\"><a href=\"javascript:grabCode_41c070f63661497a97f50a0f6a0faf5a()\"><span style=\"font-size: x-small; font-style: italic;\">Get\r\nthe MATLAB code<\/span><\/a><\/p>\r\n\r\n<noscript>(requires JavaScript)<\/noscript>&nbsp;\r\n\r\n<p style=\"text-align: right; font-size: xx-small; font-weight: lighter; font-style: italic; color: gray;\">Published with MATLAB\u00ae R2014b<\/p>\r\n\r\n<\/div>\r\n<!--\r\n41c070f63661497a97f50a0f6a0faf5a ##### SOURCE BEGIN #####\r\n%% Acquire Data from Device Sensors\r\n% With the new MATLAB\u00c2\u00ae Support Package for Android\u00e2\u201e\u00a2 Sensors, you can now use MATLAB Mobile\u00e2\u201e\u00a2 to acquire data from the sensors on your Android device. This data can be sent to a MATLAB session running on your computer for further analysis and visualization.\r\n\r\n%% What data, you ask?\r\n% MATLAB Mobile supports data acquisition from motion sensors like the accelerometer as well as positional sensors like the GPS. A list of all sensors is shown below.\r\n%\r\n% <<List_of_Sensors.png>>\r\n\r\n%% Viewing Sensor Data\r\n% You can access these sensors by selecting the _Sensors_ option from the drop-down menu in MATLAB Mobile. You can tap on a sensor to enable it and view related measurements. The screenshot below is the result of turning on the Accelerometer and Magnetometer.\r\n%\r\n% <<Sensors_Acc_Mag.png>>\r\n\r\n%% Analyze Data with MATLAB\r\n% Displaying this data is cool, but to make this truly useful, you will want to perform further analysis and processing. Fortunately, the MATLAB Support Package for Android Sensors helps you do just that! It enables you to send sensor data to a MATLAB session on your computer. To do this:\r\n% * Connect MATLAB Mobile to your computer with the MATLAB Connector.\r\n% For more information on how to do this, refer to the getting started instructions here.\r\n% This feature is only supported on MATLAB R2014a and later, so make sure you are on a compatible version.\r\n%\r\n% * Install the MATLAB Support Package for Android Sensors.\r\n% Choose _Add-ons_ from the MATLAB Toolstrip, and then choose _Get Hardware Support Packages_. This will open the support package installer.\r\n% Choose _Android Sensors_ from the list and follow the instructions.\r\n%\r\n% * To establish communication between the sensors on your device and MATLAB, create a mobiledev object, as follows\r\n%\r\nm = mobiledev;\r\n\r\n%% Example: Counting Steps by Capturing Acceleration Data\r\n% The mobiledev object facilitates communication between the sensors on your Android device and the MATLAB session running on your computer. Let\u00e2\u20ac\u2122s explore this workflow through an example that illustrates the collection of acceleration data and using it to count the number of steps taken.\r\n%\r\n% *Step 1: Turn on the Accelerometer*\r\n%\r\n% Once you have completed the 3 steps from the above section, go to MATLAB Mobile and turn on the accelerometer. You should see something akin to this:\r\n%\r\n% <<Sensors_Acc.png>>\r\n%\r\n% You can also enable the sensor directly from MATLAB, by executing the following command:\r\n\r\nm.AccelerationSensorEnabled = 1;\r\n\r\n%%\r\n% *Step 2: Send Data to MATLAB*\r\n%\r\n% Did you notice the enabled _Start Sending_ button towards the bottom of your screen? Tap on it, and voila! You are now sending data to MATLAB.\r\n%\r\n% Alternatively, you can start sending data directly from MATLAB, through the following command:\r\n%\r\nm.Logging = 1;\r\n\r\n%%\r\n% You can verify this in MATLAB, note the Current Sensor Values in the result:\r\n%\r\nm\r\n\r\n%%\r\n% *Step 3: Stop Acquiring Data and Retrieve Logs*\r\n%\r\n% Walk around your campus\/home\/floor with your device. Once you are satisfied, stop sending this data to MATLAB. You can either tap on the _Stop Sending_ button on MATLAB Mobile, or issue the following command in MATLAB:\r\n%\r\nm.Logging = 0;\r\n\r\n%%\r\n% To retrieve the data, use the accellog variable:\r\n%\r\n[a, t] = accellog(m);\r\n\r\n%%\r\n% *Step 4: Plot Raw Sensor Data*\r\n%\r\n% Once you have retrieved the logged acceleration data, you can plot it in MATLAB:\r\n%\r\nplot(t, a);\r\nlegend('X', 'Y', 'Z');\r\nxlabel('Relative time (s)');\r\nylabel('Acceleration (m\/s^2)');\r\n\r\n%%\r\n% Calculate the magnitude to convert your X, Y and Z vectors to scalar values. Then, plot it.\r\n%\r\nx = a(:,1);\r\ny = a(:,2);\r\nz = a(:,3);\r\n\r\n% Calculate and plot magnitude.\r\nmag = sqrt(sum(x.^2 + y.^2 + z.^2, 2));\r\nplot(t, mag);\r\nxlabel('Time (s)');\r\nylabel('Acceleration (m\/s^2)');\r\n\r\n%%\r\n% To remove constant effects such as gravity, you can subtract the mean from this data.\r\n\r\n% Accounting for gravity.\r\nmagNoG = mag - mean(mag);\r\n\r\n% Plot magnitude.\r\nplot(t, magNoG);\r\nxlabel('Time (s)');\r\nylabel('Acceleration (m\/s^2)');\r\n\r\n%%\r\n% The plotted data is now centered on zero, and shows peaks which correspond to a step taken while walking.\r\n\r\n%%\r\n% *Step 5: Count Number of Steps Taken*\r\n%\r\n% To determine the number of steps taken, you can use to FINDPEAKS function from Signal Processing Toolbox. In this example, we are treating only peaks with a minimum height above one standard deviation as a step. This threshold should be tuned experimentally to match a person\u00e2\u20ac\u2122s level of movement while walking, hardness of floor surfaces etc.\r\n\r\n% Use FINDPEAKS to determine the local maxima.\r\nminPeakHeight = std(magNoG);\r\n[pks, locs] = findpeaks(magNoG, 'MINPEAKHEIGHT', minPeakHeight);\r\n\r\n%%\r\n% The number of steps taken is the number of peaks:\r\n%\r\nnumSteps = numel(pks)\r\n\r\n%%\r\n% Finally, you can also identify these locations on your plot of acceleration magnitude data:\r\n%\r\nhold on;\r\n\r\n% Place a red marker on the locations that correspond to peaks.\r\nplot(t(locs), pks, 'r', 'Marker', 'v', 'LineStyle', 'none');\r\ntitle('Counting Steps');\r\nxlabel('Time (s)');\r\nylabel('Acceleration Magnitude, Gravity Removed (m\/s^2)');\r\nhold off;\r\n\r\n%%\r\n% *Step 6: Clean Up*\r\n%\r\n% Once you are done, make sure you turn off the acceleration sensor and clear the mobiledev object.\r\n%\r\nm.AccelerationSensorEnabled = 0;\r\nclear m;\r\n\r\n%% Try it out!\r\n% To learn more about acquiring data from sensors on your mobile device, refer to the following links:\r\n%\r\n% <https:\/\/www.mathworks.com\/products\/matlab-mobile.htmlfeatures.html#acquiring_data_from_sensors Acquiring Data from Sensors - MATLAB Mobile>\r\n%\r\n% <https:\/\/www.mathworks.com\/hardware-support\/android-sensor.html Android Sensor Support from MATLAB>\r\n%\r\n% < Documentation for mobiledev Object>\r\n\r\n%%\r\n% What data are you acquiring, and what insights are you gaining from your analysis of that data?\r\n% Let us know by leaving a comment below.\r\n##### SOURCE END ##### 41c070f63661497a97f50a0f6a0faf5a\r\n-->","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/List_of_Sensors.png\" onError=\"this.style.display ='none';\" \/><\/div><!--introduction-->With the new MATLAB\u00ae Support Package for Android\u2122 Sensors, you can now use MATLAB Mobile\u2122 to acquire data from the sensors on your Android device. This data can be sent to a MATLAB session running on your computer for further analysis and visualization.<!--\/introduction-->... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/community\/2014\/10\/06\/acquire-data-from-device-sensors-with-matlab-mobile\/\">read more >><\/a><\/p>","protected":false},"author":74,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[54],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/2905"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/users\/74"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/comments?post=2905"}],"version-history":[{"count":105,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/2905\/revisions"}],"predecessor-version":[{"id":4281,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/2905\/revisions\/4281"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/media?parent=2905"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/categories?post=2905"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/tags?post=2905"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}