Effacer les filtres
Effacer les filtres

How to give output of Fortran code into MATLAB

4 vues (au cours des 30 derniers jours)
afaq ahmad
afaq ahmad le 13 Août 2021
Réponse apportée : Chunru le 13 Août 2021
I have a mathematical model of a physical system written entierly in Fortran. I want to design a controller for that system in Matlab.
For this, I need to transfer the output of the system model from Fortran into Matlab, where Matlab is gonna recieve the output of the
system model and run it through the controller and send it back to Fortran. How can I achieve this?
Thanks!

Réponse acceptée

Chunru
Chunru le 13 Août 2021
There are two possible approaches:
  • Use data file to communicate before FORTRAN code and matlab program. Use matlab to so a system call of standard alon FORTRAN executable. FORTRAN program generates the output in a data file. Then MATLAB read in the data.
  • Write Fortran mex file to call fortran inside matlab.

Plus de réponses (0)

Catégories

En savoir plus sur Fortran with MATLAB dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by