필터 지우기
필터 지우기

save into csv file

조회 수: 5 (최근 30일)
Jake
Jake 2013년 8월 2일
Hi, I have a problem with saving cell array into csv file. abc = [name age]; I just want to save this to csv file.. Could anyone please help me out? I've tried by myself using the following codes.
fid=fopen('C:\MATLAB\name.csv','w'); fprintf(fid, '%6.2f %12.8f\n', abc); fid=fclose(fid);
But, it keeps repeating that fprintf doesn't work with cell array.. Do you have any idea to deal with this?
Thanks in advance

답변 (1개)

Iain
Iain 2013년 8월 2일
try xlswrite, or csvwrite instead.
Either that or change the format of your cell array back into a numerical array...
  댓글 수: 1
Jake
Jake 2013년 8월 2일
Thanks for your response. But, the cell array is composed of name.... It seems that csvwrite doesn't allow cell array to be saved into csv file. Do you have any idea?

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

카테고리

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