Effacer les filtres
Effacer les filtres

Save a string consisting of data to another directory

3 vues (au cours des 30 derniers jours)
FG
FG le 23 Sep 2020
Commenté : FG le 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 ?

Réponse acceptée

Ameer Hamza
Ameer Hamza le 23 Sep 2020
Modifié(e) : Ameer Hamza le 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 commentaires
FG
FG le 23 Sep 2020
Ameer; I just want to save c to another directory..
FG
FG le 23 Sep 2020
Thnx I did it Ameer

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by