How to Display Data in Table
527 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Chunru
2021-12-12
编辑:Chunru
2023-12-4
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Genomics and Next Generation Sequencing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!