フィルターのクリア

Converting row to column in text file

2 ビュー (過去 30 日間)
Jhon Gray
Jhon Gray 2021 年 3 月 24 日
編集済み: Walter Roberson 2021 年 3 月 24 日
I have a text file with annotation like this
I want to shift every alphabet in colum form. Like this.
Tried several ways. failed as the import data need comma or semicolor for separation.
Can anyone help with that?

採用された回答

Walter Roberson
Walter Roberson 2021 年 3 月 24 日
編集済み: Walter Roberson 2021 年 3 月 24 日
%note: output file name must be different than input name for this
%particular version of the code to work.
[fid, msg] = fopen('new_x01.txt', 'w');
if fid < 0; error('Could not open file because "%s"', msg); end
fprintf(fid, '%c\n', fileread('x01.txt'));
fclose(fid);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import and Export についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by