How to access a Database from Simulink?

3 views (last 30 days)
Hi all,
I'm using Database Toolbox to query data from a PostgreSQL via MATLAB script. I want to do the same from within Simulink. Could anyone help me with that?
Thank you,

Answers (1)

Fangjun Jiang
Fangjun Jiang on 21 Apr 2020
You can always use the "MATLAB Function" block. Keep in mind that it is executed at every simulation step.
  2 Comments
Srivenkata Satya Prasad Maddipatla
MATLAB function blocks are giving an error for the 'database' function that code cannot be generated. I got around this by using a MATLAB Level-2 S-function.
Christopher Dieck
Christopher Dieck on 13 Jun 2022
Could you provide the S_Function?

Sign in to comment.

Categories

Find more on Reporting and Database Access in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!