unable to plot columns of multiple cells
1 次查看(过去 30 天)
显示 更早的评论
My program is attached.
I am working with cell, the last one is a 2D cell. I am unable to plot col_3 v/s col_1 logscale on X-axis along with the error bars.
I was wondering if someone could help me.
Thanks
0 个评论
回答(1 个)
Star Strider
2023-11-6
Logarithms of time variables do not actually exist (probably anywhere), however there are ways to get round that problem.
This plots ‘t_sclk’ against ‘t_utc’ using a semilogx scale —
% type('distribution.mlx')
T1 = readtable('mvn_ngi_l2_ion...8_v08_r01.csv')
[t1,t2] = bounds(T1{:,1})
Col1 = T1.t_utc - T1.t_utc(1)+seconds(0.001); % Create 'duration' Array
[h,m,s] = hms(Col1); % Get Components
Col1_CumTime = cumsum(diff([0; m]) < 0)*60 + s; % Convert To Cumulative Seconds
% [h1,h2] = bounds(Col1_CumTime)
figure
semilogx(Col1_CumTime, T1.t_sclk)
grid
xt = xticks;
idx = ceil(linspace(1, size(T1,1), numel(xt)));
xticklabels(string(T1.t_utc(idx))) % Assign Labels
.
6 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!