필터 지우기
필터 지우기

how to write an array to file

조회 수: 78 (최근 30일)
hang dong
hang dong 2019년 6월 7일
답변: KSSV 2019년 6월 7일
how can i write the result of an array to a txt file, or excel
I want to record the array S values ​​to a file
please help me
S = zeros(1,256);
for j = 1:256
S(j)= j ;
end
for i = 1 :256
j = floor(x(i)/gt*2^8);
if j==0
j=256;
end
t = 2^8 - i;
if t==0
t=256
end
%[S(j), S(t)] = swap(S(t), S(j));
j
t
a = S(j)
S(j)= S(t)
S(t) = a
end
for i = 1:256
disp(S(i));
end
  댓글 수: 4
Stephan
Stephan 2019년 6월 7일
fprintf.JPG
hang dong
hang dong 2019년 6월 7일
Can you give me an example?

댓글을 달려면 로그인하십시오.

채택된 답변

KSSV
KSSV 2019년 6월 7일
writetable(array2table(S),'test.xlsx')
Or
xlswrite('test.xlsx',S) ;

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by