how to plot and save graphs in one folder?

i have saved my file here as 452.txt . I want to plot my graphs in some what similiar way as file.JPG and save all figures into one folder (Folder name="Figures') and name of each figure should be as ('1') ('2') ('3')
inputdata=('S11ouput')
freq=inputdata=(:,1);
sparam=inputdata(:,2);
plot(freq,sparam);ylabel('sparam');xlabel('freq')
% my freq is in GHz and sparam are in approx 1e^-3
% how to get ylim in decimal places like 0.00032 0.00034 0.00035

回答 (1 件)

Image Analyst
Image Analyst 2022 年 5 月 8 日

0 投票

Create a filename somehow, like with sprintf(). Then use exportgraphics() to save your axes or figure to disk.

4 件のコメント

Rakesh Roshan
Rakesh Roshan 2022 年 5 月 8 日
I am using 2018a version ... Any other way is there
Image Analyst
Image Analyst 2022 年 5 月 8 日
編集済み: Image Analyst 2022 年 5 月 8 日
A good example of why people should post their version when they fill out the submission form instead of just skipping that part. I added it for you just now.
Maybe export_fig:
Rakesh Roshan
Rakesh Roshan 2022 年 5 月 9 日
This didn't work out for me
Image Analyst
Image Analyst 2022 年 5 月 9 日
Then try print or saveas

サインインしてコメントする。

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

製品

リリース

R2018a

質問済み:

2022 年 5 月 8 日

コメント済み:

2022 年 5 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by