Save a string consisting of data to another directory

2 visualizaciones (últimos 30 días)
FG
FG el 23 de Sept. de 2020
Comentada: FG el 23 de Sept. de 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 ?

Respuesta aceptada

Ameer Hamza
Ameer Hamza el 23 de Sept. de 2020
Editada: Ameer Hamza el 23 de Sept. de 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 comentarios
FG
FG el 23 de Sept. de 2020
Ameer; I just want to save c to another directory..
FG
FG el 23 de Sept. de 2020
Thnx I did it Ameer

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by