필터 지우기
필터 지우기

How can I create a .txt files from a cellarray that is 80x1 into 80 different files with the same name with different number in the end?

조회 수: 2 (최근 30일)
LF{80x1} cell array
writematrix(LF{#},'LF#.txt','Delimiter','\t');
type LF#.txt
I want to create an inidvidual .txt file for each cell of the cell array with a succession of numbers without changing manually.
For example
cell array 1
LF{1} that creates a .txt file named LF1.txt

채택된 답변

Walter Roberson
Walter Roberson 2023년 11월 8일
for K = 1 : numel(LF)
filename = "LF" + K + ".txt";
writematrix(LF{K}, filename, 'Delimiter', '\t');
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Text Files에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by