我必须计算给定数据集的ADX,然后绘制由仪器的2秒烛台组成的it.The数据集,为期5天。我已经从excel中验证了ADX的值,结果是correct.But,我得到的图不是根据获得的值。最终绘图的代码是
plt.plot(timestamp[29:len(closing_values)],ADX[29:len(closing_values)])

发布于 2019-12-26 01:58:06
我很确定问题出在你的约会对象上。确保它们是matlab序列日期或日期时间。
% function to convert matlab serial dates to yyymmdd format
serial2yyyymmdd = @(seryl) datevec(seryl)*[1e4 1e2 1 0 0 0]';
dta = randn(300,1);
figure;
subplot(2,1,1)
% plot with yyyymmdd dates
plot(serial2yyyymmdd(today-299:today),dta)
title('plot with yyyymmdd dates')
subplot(2,1,2)
% plot with matlab serial dates
plot(today-299:today,dta)
title('plot with matlab serial dates')

https://stackoverflow.com/questions/59470411
复制相似问题