Writing a txt file via matlab
1 view (last 30 days)
Show older comments
Hello,
I want to write a txt file via matlab, with a '.tck' extension instead of txt
I have the following :
b =
'BKY' 'DIS' 'KIY'
Then
fileID = fopen('ko.tck','wt')
I do get a fileID.
Then I want to transfer the content of b to the file
fprintf(fileID,'%s\n',b)
I get the following error :
Error using fprintf
Function is not defined for 'cell' inputs.
Do you know how to get these strings in a list form in my .tck file?
Thank you
D
0 Comments
Answers (1)
Azzi Abdelmalek
on 24 Nov 2014
b={'BKY' 'DIS' 'KIY'}
fileID = fopen('ko.tck','wt')
fprintf(fileID,'%s\n',b{:})
fclose(fileID)
See Also
Categories
Find more on Whos in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!