Label Columns and Rows of Dat file

조회 수: 5 (최근 30일)
fadams18
fadams18 2019년 11월 13일
Hello Guys,,
How to I Label the rows of a dat file. to look like in the picture below
Screenshot_2019-11-13 JournalPlots2 - Online LaTeX Editor ShareLaTeX.png
clear
clc
nu= 50;
ps=1;
load(['CPU_nu_',int2str(nu),'_', int2str( ps),'.mat'],'E_NeNMF_R', 'M_NeNMF_R',...
'E_NeNMF_V','M_NeNMF_V','E_AS_V','M_AS_V','E_AS_R','M_AS_R');
figure_Col(1,2) = E_NeNMF_R;
figure_Col(1,3) = M_NeNMF_R;
figure_Col(2,2) = E_NeNMF_V;
figure_Col(2,3) = M_NeNMF_V;
figure_Col(3,2) = E_AS_R;
figure_Col(3,3) = M_AS_R;
figure_Col(4,2) = E_AS_V;
figure_Col(4,3) = M_AS_V;
hdrs = {'Algorithm','E-step','M-step'
};
namedatfile= [int2str(nu) '_nu_' int2str(ps) '_pass.dat'];
fname = namedatfile;
txt=sprintf('%s\t',hdrs{:});
txt(end)='';
dlmwrite(fname,txt,'');
dlmwrite(fname,figure_Col,'-append','delimiter','\t');
But my table looks like this
Screenshot from 2019-11-13 16-05-53.png
How do i replace the '0's with names like in the first picture.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Cell Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by