excel(或matlab)画图问题,两个曲线画在一个图里.画类似下面那样的一个图.数据:A=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31];E=[71,1,16,30,4,0,54,73,0,24,15,32,51,36,23,219,213,325
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/28 03:16:32
excel(或matlab)画图问题,两个曲线画在一个图里.画类似下面那样的一个图.数据:A=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31];E=[71,1,16,30,4,0,54,73,0,24,15,32,51,36,23,219,213,325
excel(或matlab)画图问题,两个曲线画在一个图里.
画类似下面那样的一个图.
数据:
A=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31];
E=[71,1,16,30,4,0,54,73,0,24,15,32,51,36,23,219,213,325,236,48,0,7,0,0,17,50,7,0,0,6,6];
F=[2,1,1,1,1,0,1,2,0,1,1,1,1,1,1,4,4,5,4,1,0,1,0,0,1,1,1,0,0,1,1];
A是时间轴,E是要画成曲线的数据,F是要画成直方图的数据.
excel(或matlab)画图问题,两个曲线画在一个图里.画类似下面那样的一个图.数据:A=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31];E=[71,1,16,30,4,0,54,73,0,24,15,32,51,36,23,219,213,325
这个题很有意思,用matlab做的.
clc;clear
A=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31];
E=[71,1,16,30,4,0,54,73,0,24,15,32,51,36,23,219,213,325,236,48,0,7,0,0,17,50,7,0,0,6,6];
F=[2,1,1,1,1,0,1,2,0,1,1,1,1,1,1,4,4,5,4,1,0,1,0,0,1,1,1,0,0,1,1];
[AH,H1,H2]=plotyy(A,F,A,E,'bar','plot');
set(H1,'LineWidth',0.6,'EdgeColor',[0 0.5 1],'FaceColor',[0 0.5 1])
set(H2,'LineWidth',2,'Color','red')
就是不知道纵坐标刻度咋弄.