Matlab coding to show the string in one line
Mostra commenti meno recenti
I have data in txt file as shown below.
aaaaaaaaaaaaaaaaaaaaaafffffffff
eeefffffaaaaaaaaaaaeeeeeeeeeeee
now,I have to show the result or ouput as shown below
'aaaaaaaaaaaaaaaaaaaaaafffffffffeeefffffaaaaaaaaaaaeeeeeeeeeeee'
I have writtten a prog.
x=fopen('data.txt','r');%data.txt contains above data
X_t=textscan(x,'%s')
A=X_t{1}
But the output is
A{1} ='aaaaaaaaaaaaaaaaaaaaaafffffffff'
A{2}='eeefffffaaaaaaaaaaaeeeeeeeeeeee'
This is not desired output.Please help............
Risposta accettata
Più risposte (1)
Tinkul
il 13 Set 2012
0 voti
1 Commento
Andrei Bobrov
il 13 Set 2012
Modificato: Andrei Bobrov
il 13 Set 2012
{[A{:}]}
Categorie
Scopri di più su Tables in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!