Write several 1x101 vectors to table for Latex
2 ビュー (過去 30 日間)
古いコメントを表示
I have 2 variable each of which are 1x101 size
A = AS_V ; % AS_V is 1x101
B = NeNMF_V; % NeNMF_V is 1x101
T = table(A,B);
save('savefile.dat', 'T')
How can i write these 2 variables into a table. so that i can use the handles to plot a figure in Latex. I want to have like 2 columns with the values of the varables and 1 row that have the names.
0 件のコメント
採用された回答
fred ssemwogerere
2020 年 2 月 18 日
Hello, this should do nicely:
A = AS_V'; % taking transpose to get a column vector of size 101x1
B = NeNMF_V';% taking transpose to get a column vector of size 101x1
Tbl=table(A,B,'VariableNames',{'A','B'});
% depending on if you are plotting A versus B or B versus A proceed to plot; (below assuming you are plotting A versus B)
figure;
hnd=plot(A,B);hnd.Parent.TickLabelInterpreter='latex'; % set tick labels to latex format
hnd.Parent.XLabel.String='vals A'; % x-label
hnd.Parent.XLabel.Interpreter='latex'; % set x-label to latex format
hnd.Parent.YLabel.String='vals B'; % y-label
hnd.Parent.YLabel.Interpreter='latex';
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で LaTeX についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!