Write several 1x101 vectors to table for Latex
1 view (last 30 days)
Show older comments
fadams18
on 17 Feb 2020
Answered: fred ssemwogerere
on 18 Feb 2020
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 Comments
Accepted Answer
fred ssemwogerere
on 18 Feb 2020
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 Comments
More Answers (0)
See Also
Categories
Find more on LaTeX in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!