How to store output when running MATLAB on a remote server?
4 ビュー (過去 30 日間)
古いコメントを表示
I know this has probably been answered before, but I'm unable to find it. If you could link me to a previous answer I'd appreciate it.
I'm running MATLAB on my school's supercomputer from my MacBook. The supercomputer is accessed through the terminal using Linux. I have limited knowledge about using the Mac terminal and Linux, but have taught myself enough to ssh into the remote server, sftp files to the remote server and back to my local machine. I'm using pre-written code from an admin at school that points to the MATLAB code in the working directory, but I need to know how to save the MATLAB output from the remote server into the working directory so I can transfer it to my local machine and ideally plot from my machine
0 件のコメント
回答 (1 件)
Swastik Sarkar
2024 年 2 月 27 日
I understand that you are interacting with MATLAB in terminal mode by using the `-nodisplay` flag, given that you are connecting to the system via SSH to generate your plots.
For your situation, the `savefig` function will allow you to save your figures directly within the working directory, bypassing the need for a graphical display, because a simple SSH does not provide a graphical display to work on.
You can find detailed guidance on how to use the `savefig` function in the MATLAB documentation here:
Once you have saved your figure, you can transfer the file to your local machine. To view the figure, you can then utilize the `openfig` function, which opens the figure file for display. Here is the documentation for `openfig`:
Hope this Helps.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!