How to convert text file to string?
32 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Maaz Madha
il 8 Dic 2021
Risposto: Abolfazl Chaman Motlagh
il 8 Dic 2021
I have a text file (containing text and not numbers) and I would like to convert it to a string so that it becomes like. I have attached an example file just as a reference
str='ExampleQuestion'
0 Commenti
Risposta accettata
Abolfazl Chaman Motlagh
il 8 Dic 2021
use fscan or fread
F = fopen('Untitled.txt');
Text = fscanf(F,'%c')
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Characters and Strings in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!