Effacer les filtres
Effacer les filtres

Writeing a stings using Matlab 2015

1 vue (au cours des 30 derniers jours)
Hassan Qassim
Hassan Qassim le 16 Fév 2019
Commenté : Star Strider le 17 Fév 2019
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

Réponse acceptée

Star Strider
Star Strider le 16 Fév 2019
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 commentaires
Hassan Qassim
Hassan Qassim le 17 Fév 2019
I will use the command window for showing up the written words, thanks a lot for your help
really apreciated
Star Strider
Star Strider le 17 Fév 2019
As always, my pleasure.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Tags

Produits


Version

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by