2020年8月2日
摘要: days = 0:5:35;%使用两个 y 轴合并线图和条形图 conc = [515 420 370 250 135 120 60 20]; temp = [29 23 27 25 20 23 23 17]; yyaxis left b = bar(days,temp); yyaxis right 阅读全文
posted @ 2020-08-02 16:35 一杯明月 阅读(1142) 评论(0) 推荐(0)
摘要: x = linspace(0,pi); y1 = cos(x); plot(x,y1) hold on y2 = cos(2*x); plot(x,y2) y3 = cos(3*x); plot(x,y3) y4 = cos(4*x); plot(x,y4) hold off legend({'co 阅读全文
posted @ 2020-08-02 15:54 一杯明月 阅读(3108) 评论(0) 推荐(0)
摘要: 转换函数的问题:谁把谁转换成什么? 设计一个class的对象a,a可不可以转换成另外一种类型,或者另外一种类型可不可以转换成a 注解: int/int 会丢失精度(网友弹幕),如5/2=2. 5/2输出的是2. cout << (double)5 / 2 << endl; 这样输出的就是2.5(相当 阅读全文
posted @ 2020-08-02 11:13 一杯明月 阅读(353) 评论(0) 推荐(0)