Filter löschen
Filter löschen

Save a string consisting of data to another directory

3 Ansichten (letzte 30 Tage)
FG
FG am 23 Sep. 2020
Kommentiert: FG am 23 Sep. 2020
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 ?

Akzeptierte Antwort

Ameer Hamza
Ameer Hamza am 23 Sep. 2020
Bearbeitet: Ameer Hamza am 23 Sep. 2020
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 Kommentare
FG
FG am 23 Sep. 2020
Ameer; I just want to save c to another directory..
FG
FG am 23 Sep. 2020
Thnx I did it Ameer

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Tags

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by