unable to plot columns of multiple cells
2 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Star Strider
on 6 Nov 2023
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 Comments
See Also
Categories
Find more on Annotations 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!