Write several 1x101 vectors to table for Latex
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
fadams18
il 17 Feb 2020
Risposto: fred ssemwogerere
il 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 Commenti
Risposta accettata
fred ssemwogerere
il 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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su LaTeX in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!