You can use MATLAB to acquire accelerometer, magnetometer, gyroscope, location, and image data from built-in sensors on your iPhone or iPad using the iPhone and iPad Sensor Support package from MATLAB.
However using this, you may not be able to control the vibration of your iPhone. You can instead use the iPhone and iPad Support Package from MATLAB Coder to generate C code and integrate it into an iPhone or iPad app using Apple’s Xcode IDE.
Here's a reference to help you get started.