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에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!