필터 지우기
필터 지우기

Save a string consisting of data to another directory

조회 수: 3 (최근 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 CenterFile Exchange에서 Whos에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by