上一页 1 ··· 110 111 112 113 114 115 116 117 118 ··· 178 下一页
  2020年8月4日
摘要: 函数im2double将输入转换成double类型。如果输入是 uint8 unit16 或者是二值的logical类型,则函数im2double 将其值归一化到[0,1]之间,当然就是double类型的了。如果输入本身就是double类型,输出还是double类型,并不进行归一化。 阅读全文
posted @ 2020-08-04 20:42 一杯明月 阅读(5420) 评论(0) 推荐(0)
  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 一杯明月 阅读(1146) 评论(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 一杯明月 阅读(3122) 评论(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 一杯明月 阅读(355) 评论(0) 推荐(0)
  2020年8月1日
摘要: Generate 10,000 random numbers and create a histogram. The histogramfunction automatically chooses an appropriate number of bins to cover the range of 阅读全文
posted @ 2020-08-01 18:54 一杯明月 阅读(13850) 评论(0) 推荐(0)
摘要: figure('name','test','NumberTitle','off'); figure(1);hold on;set(gcf,'color','w'); % 这句是设置背景色为白色 阅读全文
posted @ 2020-08-01 18:01 一杯明月 阅读(434) 评论(2) 推荐(0)
摘要: matlab中矩阵的点乘就是对应元素相乘: a=[1 2 3;4 5 6] a = 1 2 3 4 5 6 b=a b = 1 2 3 4 5 6 a.*b ans = 1 4 9 16 25 36 阅读全文
posted @ 2020-08-01 11:28 一杯明月 阅读(4464) 评论(0) 推荐(0)
  2020年7月31日
摘要: #include<iostream> #include<unistd.h> using namespace std; int main() { cout<<"hello,world!"<<endl; return 0; pause; } 阅读全文
posted @ 2020-07-31 17:05 一杯明月 阅读(743) 评论(0) 推荐(0)
  2020年7月30日
摘要: 泛型编程(Generic Programming)和面向对象编程(Object-Oriented Programming)虽然分属于不同思维,但是它们正式C++的技术主线,所以本课程也讨论模板(template). 深入探索面向对象之继承关系(inheritance)所形成的对象模型(Object 阅读全文
posted @ 2020-07-30 23:00 一杯明月 阅读(153) 评论(0) 推荐(0)
  2020年7月29日
摘要: Inheritance(继承) with virtual functions(虚函数) non-virtual函数(不是虚函数):你希望drived class(子类)不要重新定义(overide,覆盖)。 virtual(虚)函数:你希望devired class(子类)最好去重新定义(overi 阅读全文
posted @ 2020-07-29 09:52 一杯明月 阅读(306) 评论(0) 推荐(1)
上一页 1 ··· 110 111 112 113 114 115 116 117 118 ··· 178 下一页