MATLAB is a programming language used primarily for numerical computations. Use this tag for questions regarding communicating or using MATLAB with Arduino. Also consider using other tags such as [programming].

learn more… | top users | synonyms

1
vote
0answers
22 views

Matlab Arduino Multi Byte Read

I'm using Matlab to communicate with a custom AD7746 board through an Arduino UNO. The data sheet mentions that "In continuous conversion mode, the address pointers’ autoincrementer should be used ...
1
vote
1answer
54 views

matlab connection to arduino using bluetooth

I am attempting to send some information from Matlab, to an Arduino Uno, via bluetooth with matlab program b=Bluetooth('HC-06',1); fopen(b); for i=1:1:15 ...
5
votes
4answers
380 views

Employing C++ code for Arduino

I have Googled quite a lot regarding using a C++ program for uploading to Arduino and related, however I am confused now. Right, my problem is this: I have written a C++ program which imports RGB ...
1
vote
0answers
15 views

Communication serial port with matlab

I am trying to communicate with a serial port trought matlab. This is my code: delete (instrfindall) clear all close all clc; s=serial('COM4'); set(s,'BaudRate',4800); set(s,'DataBits',8); set(s, ...
0
votes
0answers
38 views

Simulink Arduino Deploy to Hardware

When Deploying to Hardware, a simple Simulink program of reading a analog signal, following error is seen. Using Win10 with Matlab 2015a (64bit). Code Generation 1 Elapsed: 0.161 sec ### ...
0
votes
1answer
41 views

MATLAB - Read from 2 SPI inputs synchronously

I am using the MATLAB Arduino Support Package to create a setup where I can read force data from a load cell and positional data from an incremental encoder - then plot them on MATLAB. It must be done ...
1
vote
0answers
49 views

Connection between Matlab and Arduino

I'm trying to connect Maltab and Arduino by this code: arduino=serial('COM7','BaudRate',9600); fopen(arduino); But I get this message: Open failed: Port: COM7 is not available. No ports are ...
-1
votes
2answers
268 views

Matlab and Arduino Serial communication

I'm new to Arduino and am learning how Serial communication works. I am trying to send a value from Matlab to Arduino, but it seems to be partly fruitful. If anyone can explain the difference between ...
-1
votes
1answer
38 views

Matlab too many input arguments using csvread

I have files called t1_25, t1_45, t1_65, t2_25, t2_45 and so on till t5_65. I wrote this piece of code: MaxForce =[0,0,0;0,0,0;0,0,0;0,0,0;0,0,0;0,0,0]; MaxForce(1,1) = 25; MaxForce(1,2) = 45; ...
0
votes
2answers
198 views

Sending serial data to Arduino from Matlab(not using support package)

I am learning Arduino and trying to understand how integers and strings are sent across the serial port. I tried a small program in arduino which reads a number as a string and tries to blink led 13 ...
-1
votes
3answers
1k views

Plotting a real time graph of sensor data from Arduino on Processing, MatLab or Python

I have an accelerometer connected to my Arduino Due to spit out data on my serial monitor as described in my earlier post. I'm trying to find a sketch I could use to plot a continuous real-time graph ...
1
vote
0answers
202 views

Problem reading HMC5843 - Magnetometer in Simulink

I'm having a SparkFun 9 DoF sensor stick including the following components: ADLX345 - Accelerometer ITG3200 Gyroscope HMC5843 - Magnetometer Im currently working on a project in which I need to ...
0
votes
1answer
540 views

Problem with deploying matlab simulink mode to Arduino UNO [closed]

I encounter a problem when deploy matlab simulink model to Arduino UNO Following shows the error *The call to realtime_make_rtw_hook, during the after_make hook generated the following error: The ...
0
votes
2answers
677 views

Matlab to Arduino communication

I am doing some computations on Matlab and I need to send those values to an Arduino Leonardo through USB serial connection. I need to send 2 variables which can vary from -400 to +400. I'm saying ...
1
vote
0answers
202 views

Arduino support package in matlab PROBLEM

i have installed the Arduino support package in matlab , and i have all blocks that come with it in my simulink the problem is that when i try to establish a serial communication i got smth like this ...
1
vote
0answers
520 views

Sending binary data to Matlab via serial

I would like to exchange data via Xbee. I've set up a communication based on strings between the Arduino and a Matlab software. Unfortunately this kind of communication isn't enough robust and ...
2
votes
4answers
886 views

Communicating between a computer and multiple Arduinos

I am designing a experiment of controlling 6 small wind turbines wirelessly. For each wind turbine, I need to measure power time series (or voltage or current time series) from the generator, and ...
1
vote
2answers
573 views

analogRead function not working in MATLAB

I am new to Arduino and I am trying to control it through MATLAB. I have downloaded the arduino IO package and installed it.I am using MATLAB 2014a.I have a LED and I change its brightness by ...
0
votes
1answer
974 views

Controlling Arduino through MATLAB?

I had a Roboteq motor controller, but it wasn't fast enough. I'm hoping Arduino will be faster. Supposing that the transfer is fast enough for my purposes, how can I read angular velocity, given that ...
4
votes
3answers
3k views

Binary serial transmission order of data

I'm implementing a filter for my IMU Sensor and thus I want close to real time data visualized on the computer. I use binary serial communication to facilitate the sending part for the arduino (as far ...
0
votes
2answers
690 views

Read Arduino code generated by Simulink

I am trying to do a Hardware-in-the-loop (HIL) system with Arduino and Simulink but the driver of my motor (Pololu VNH5019) works at 20kHz and simulink PWM block only supports 490Hz. I would like to ...
5
votes
4answers
13k views

How can I communicate from Arduino to MATLAB

I want to use sensors on an Arduino to control values in a MATLAB program. What are my options for communicating? I've used Processing to receive data sent via the serial cable, and that strategy has ...
5
votes
2answers
2k views

How to pause Arduino for 1 millisecond through MATLAB?

I have been able to connect MATLAB to my Uno with this line of code: a = arduino('COM4'); through this package: Matlab support package for Arduino. Right now, MATLAB is my main script that will ...