How to Display Data in Table
460 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Anthony Koning
am 11 Dez. 2021
Kommentiert: Phoebe
am 15 Jun. 2024
I wanted to ask how it would be possible to display the data of an exteriment into a table. For instance, If I am doing 11 trials, starting from 0 and rising to 50 in incraments of 5, how would I be able to display data in a table? I understand that it would be possible to format everything into an array and enter all values manually , but is it possible to display results directly as a table (for instance, if I wanted to up the trials from 11 to 100, so I wouldnt have to enter all values manually)
The code I'm working with is:
v = 0:5:50
a_n=(-0.01.*(v+50))./(exp(-(v+50)./10)-1)
b_n= exp(-(v+60)./80)./8
a_m = (-.1.*(v+35))./(exp(-(v+35)./10)-1)
b_m = 4.*exp(-(v+60)./18)
a_h = .07.*exp(-(v+60)./20)
b_h = 1./(exp(-(v+30)./10)+1)
but I want to display the results as a neatly organized table rather than a general output, especially if I want to change the start/endpoint or intervals.
0 Kommentare
Akzeptierte Antwort
Chunru
am 12 Dez. 2021
Bearbeitet: Chunru
am 4 Dez. 2023
v = (0:5:50)'; % use a column here
a_n=(-0.01.*(v+50))./(exp(-(v+50)./10)-1);
b_n= exp(-(v+60)./80)./8;
a_m = (-.1.*(v+35))./(exp(-(v+35)./10)-1);
b_m = 4.*exp(-(v+60)./18);
a_h = .07.*exp(-(v+60)./20);
b_h = 1./(exp(-(v+30)./10)+1);
% For same size data here, you can organize them into a table
T = table(v, a_n, b_n, a_m, a_h, b_h)
% if you want to show part of the data
T(4:7, :)
% To display table with specific format:
% Round it and save to a new variable
T1 = varfun(@(x)(round(x, 2)), T)
3 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Genomics and Next Generation Sequencing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!