Borrar filtros
Borrar filtros

How i can i link my m file with simulink block?

15 visualizaciones (últimos 30 días)
EDDYKURNIAWAN ABDRAUF
EDDYKURNIAWAN ABDRAUF el 14 de Nov. de 2016
Comentada: EDDYKURNIAWAN ABDRAUF el 17 de Nov. de 2016
Helloo guy... i have problem communication between m file with simulink.... i have plot the real time data in figure from arduino that send into matlab by bluetooth. The data is from sensor mpu6050 in angle.... now i have simulink block that have fuzzy logic algorithm...now i want the angle value will be my input for my simulink block...can anybody told how?..i have read about matlab function...but still not understand

Respuesta aceptada

Hari Desanur
Hari Desanur el 16 de Nov. de 2016
You can integrate MATLAB code into your Simulink model using the MATLAB Function Block.
You can execute your MATLAB code from within the model to read the input data from your sensor and then pass this data into your Simulink block.
Refer to this example on how to use a MATLAB function block in your model.
  1 comentario
EDDYKURNIAWAN ABDRAUF
EDDYKURNIAWAN ABDRAUF el 17 de Nov. de 2016
i matlab code that will run and have readAcc function to read the sensor using bluetooth..now im try to make the readAcc fucntion into matlab function and [ax ay az gx]=readAcc(out,mode), mode is 2 and out the object to created to store the data...so i confuse how to insert value of out

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Modeling en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by