If you can call compassRead() to get the current direction, you should be able to stick the result in the variable.The most common way to get that data to something like Matlab is to connect the Arduino to your computer using a serial port and USB adapter. Then it's a matter of printing the compass data to the serial port.If you Google Arduino and Matlab, you're bound to find lots of examples. While they won't specifically be about the compass reading, once you understand how to send arbitrary data to Matlab, and once you understand calling compassRead() to get your heading, you should be able to read your heading and send it to Matlab.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16