上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页
摘要: 一维傅里叶功率谱的计算 #include <stdio.h> #include <math.h> #define pi 3.1415926 #define rows 3 #define colums 5 typedef struct { float re;// really float im;// 阅读全文
posted @ 2023-07-12 10:34 阿坦 阅读(289) 评论(0) 推荐(0)
摘要: CUDA中threadldx、blockldx、blockDim和gridDim的全程 threadIdx是thread index 线程索引缩写 blockIdx是block index 块索引缩写 blockDim是block dimension 块维度缩写 gridDim是grid dimen 阅读全文
posted @ 2023-07-10 09:28 阿坦 阅读(61) 评论(0) 推荐(0)
摘要: 有三种方向可提高C++运行速度:语言、算法和硬件 1、语言方向:函数调用使用指针传递代替向量拷贝(节约数据拷贝时间) 皮尔逊相关系数函数调用指针传递版如下 #include <iostream> #include <iomanip> #include <vector> #include <cmath 阅读全文
posted @ 2023-07-03 10:40 阿坦 阅读(284) 评论(0) 推荐(0)
摘要: 相关系数(皮尔逊相关系数)公式如下 相关系数代码如下 #include <iostream> #include <vector> #include <cmath> using namespace std; // 计算平均值 double mean(vector<double> v) { double 阅读全文
posted @ 2023-06-28 16:05 阿坦 阅读(300) 评论(0) 推荐(0)
摘要: 一:单片机的BootLoader Bootloader部分移植ST官网的例程,官网例程的IAP有多个文件,为了移植方便我把多个文件合成了一个ymodem.c文件和ymodem.h文件 /* * ymodem.c * * Created on: Jun 6, 2023 * Author: MingYi 阅读全文
posted @ 2023-06-07 10:52 阿坦 阅读(2285) 评论(2) 推荐(0)
摘要: __HAL_UART_FLUSH_DRREGISTER(&huart1);//清空串口数据寄存器 __set_FAULTMASK(1);//关闭总中断 NVIC_SystemReset();//请求单片机重启 阅读全文
posted @ 2023-06-05 15:17 阿坦 阅读(144) 评论(0) 推荐(0)
摘要: #include <iostream> #include <windows.h> #include <thread> class SerialPort { public: //构造函数,打开串口并设置参数 SerialPort(const char* portName) { std::string 阅读全文
posted @ 2023-06-01 11:40 阿坦 阅读(60) 评论(0) 推荐(0)
摘要: C++代码傅里叶变换如下 #include <stdio.h> #include <math.h> #define pi 3.1415926 #define rows 3 #define colums 5 typedef struct { float re;// really float im;// 阅读全文
posted @ 2023-05-18 14:07 阿坦 阅读(65) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <math.h> #define pi 3.1415926 #define rows 3 #define colums 5 typedef struct { float re;// really float im;// imaginary }c 阅读全文
posted @ 2023-05-17 13:58 阿坦 阅读(71) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <math.h> #define pi 3.1415926 #define rows 3 #define colums 5 typedef struct { float re;// really float im;// imaginary }c 阅读全文
posted @ 2023-05-13 10:51 阿坦 阅读(382) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页