How to write data to text file on raspberry pi using matlab

3 vues (au cours des 30 derniers jours)
Pham Trong Hien
Pham Trong Hien le 29 Mai 2020
Commenté : Pham Trong Hien le 31 Mai 2020
Hello everyone, I'm making a project with Raspberry pi and Matlab , I successfully to generate the code to Raspberry Pi and make it run standalone. Now I want this application can save data to .txt on Raspberry Pi. Is that possible?

Réponse acceptée

Ryan Livingston
Ryan Livingston le 30 Mai 2020
The MATLAB functions fopen, fprintf, fclose all support code generation. They use the C runtime library so they can run on the Raspberry Pi to create and write text files.
See the Low-Level File I/O section here:
  3 commentaires
Ryan Livingston
Ryan Livingston le 31 Mai 2020
The file will be located wherever you run the generated code. So if you run the generated code on the Pi, the file will be created there.
Pham Trong Hien
Pham Trong Hien le 31 Mai 2020
OK Thanks for your help, I will try it.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB Support Package for Raspberry Pi Hardware dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by