write char array and num to textfile using fprintf
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Thomas Halbedl
am 14 Mär. 2018
Kommentiert: Thomas Halbedl
am 14 Mär. 2018
hi, i have one column char array (e.g. a = ['ab'; 'cd']) and one column vector with nums (e.g. b = [1;2]). how can i write this to a txt-file without using a loop. I tried fprintf('%s; %f\n', a, b), but it doesn't satisfying me.
Thank you
2 Kommentare
Stephen23
am 14 Mär. 2018
"i have one column char array (e.g. a = ['ab'; 'cd'])"
That char array actually has two columns:
>> a = ['ab'; 'cd'];
>> size(a,2)
ans = 2
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!