How to save a figure on Raspberry PI?

조회 수: 2 (최근 30일)
Nagy Roland
Nagy Roland 2020년 11월 11일
댓글: Nagy Roland 2020년 11월 12일
Hi,
I have a standalone application from Matlab code to Raspberry PI 4B (target hardware is the Raspberry). My question is that can I save a figure (plot) with standalone application to Raspberry? (I can use fprintf command to save text files to Raspberry, but I don't know that it is possible to save figures like text file. I have a lot of data and I'd like to plot them already on the Raspberry.)
Thanks,
Roland

채택된 답변

Reeno Joseph
Reeno Joseph 2020년 11월 12일
Hello Nagy,
The "plot" function in MATLAB is not codegen capable and so you cannot use it directly for deployment.
A workaround you can try:
  1. Save your data to a binary file withn the SD card of Raspberry Pi (please refer fwrite )
  2. Transfer the binary file to MATALB and read the data from the binary file (please refer fread )
  3. You can plot the required data in MATLAB
Hope this helps,
Reeno
  댓글 수: 1
Nagy Roland
Nagy Roland 2020년 11월 12일
Hi,
Ok, my second think was this, I just wondered if there was another solution. In this case, I will do this.
Thanks,
Roland

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Support Package for Raspberry Pi Hardware에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by