필터 지우기
필터 지우기

Writeing a stings using Matlab 2015

조회 수: 1 (최근 30일)
Hassan Qassim
Hassan Qassim 2019년 2월 16일
댓글: Star Strider 2019년 2월 17일
Hello All
i am working on algorithm that has the ability to creat a text file and write on it depending on specific commands.
i am in need to write words using matlab and the results should be showed simultaneously in the text file (no need to re-open the text file again).
i am looking for something like attached photo.
Any suggestions?
regards
Untitled.jpg

채택된 답변

Star Strider
Star Strider 2019년 2월 16일
The standard output (The Command Window) has a file identification number = 1.
So:
fprintf(fid, 'Hello\nWorld\n')
will print to the file , and
fprintf(1, 'Hello\nWorld\n')
or in more recent releases:
fprintf('Hello\nWorld\n')
will print to the Command Window.
  댓글 수: 4
Hassan Qassim
Hassan Qassim 2019년 2월 17일
I will use the command window for showing up the written words, thanks a lot for your help
really apreciated
Star Strider
Star Strider 2019년 2월 17일
As always, my pleasure.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

제품


릴리스

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by