bonjour;
le fichier txt (f1.txt) que j'ai contient la chaine suivante
sans retour à la ligne
Code : Sélectionner tout - Visualiser dans une fenêtre à part <html><head></head><body><math xmlns="http://www.w3.org/1998/Math/MathML" mode="display" dir="rtl"><mrow><mi>ق</mi><!--<mo>⁡</mo>--><mfenced open="(" close=")"><mi>س</mi></mfenced><mo>=</mo><mn>٠</mn></mrow></math></body></html>
je fais la lecture sur matlab par le code suivant;
je veux que c soit de taille {1x1 cell} cad une seul chaine.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 ch=pwd() fid=fopen ([ch,'\ground truth\f1.txt']) c=textscan(fid,'%s') c = {6x1 cell} c{1} ans = '<html><head></head><body><math' 'xmlns="http://www.w3.org/1998/Math/MathML"' 'mode="display"' 'dir="rtl"><mrow><mi>ق</mi><!--<mo>⁡</mo>--><mfenced' 'open="("' [1x92 char]
j'ai contaté que textscan ne considère pas les espaces et à chaque fois qu'il trouve un espace il retourne à la ligne.
comment résoudre ce problème? pouvez vous m'aider svp je serai très reconnaissante.
Partager