Save a string consisting of data to another directory

1 回表示 (過去 30 日間)
FG
FG 2020 年 9 月 23 日
コメント済み: FG 2020 年 9 月 23 日
I want to save a string consisting data to another directory..
c = sprintf('Power Factor=%.2f, PL=%g, FG=%g, Angle=%g, Nt=%g.mat', QM1, PL, FG, Ang_A, Nt);
How can I save c to the D:\Sim Results directory ?

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 9 月 23 日
編集済み: Ameer Hamza 2020 年 9 月 23 日
f = fopen('D:\Sim Results\filename.txt')
fprintf(f, 'Power Factor=%.2f, PL=%g, FG=%g, Angle=%g, Nt=%g.mat', QM1, PL, FG, Ang_A, Nt);
fclose(f);
  2 件のコメント
FG
FG 2020 年 9 月 23 日
Ameer; I just want to save c to another directory..
FG
FG 2020 年 9 月 23 日
Thnx I did it Ameer

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWhos についてさらに検索

タグ

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by