Extracting data from structures to create a table and export to latex

Dear all, I have a structure object wich is exemplary called mean.usa.gdp, the second level (.usa) has 24 entries, the third level (.gdp) has 3 entries.
which I created in a loop:
if true
Var = {'CGV','GDPV','REGIME'};
nv = length(Var);
Countries = {'usa','jap','ger',...,'slo'};
nc = length(Countries);
for ii=1:nc
for jj=1:nv
eval(['lengths.' Countries{ii} '.' Var{jj} '= length(find(isnan(countrydata.' Countries{ii} '.' Var{jj} ')==0))']);
end
end
end
Now I would like to create a table with the list of countries on the horizontal and the variables on the vertical,
Something like:
usa | jap | ger | ...
GDPV ... | ... | ... | ...
CGV ... | ... | ... | ...
REGIME ... | ... | ... | ...
and I would like to export this table to Latex directly. Any help here would be greatly appreciated!
Best, Philipp

댓글 수: 2

I've been waiting over four years for an answer to this question. I asked it my freshman year in college and I have since graduated. Does anyone know how to export tables from matlab to latex without resorting to dlmwrite or writetable with a delimiter and then replace the delimeter with &'s, is there any way to specifiy a custom delimeter?
Stephen23
Stephen23 2018년 11월 22일
편집: Stephen23 2018년 11월 22일
@Sasha Egan: This search returns 195 results. Did you try any of them?:

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Tables에 대해 자세히 알아보기

질문:

2014년 2월 8일

편집:

2018년 11월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by