上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页
摘要: __HAL_UART_FLUSH_DRREGISTER(&huart1);//清空串口数据寄存器 __set_FAULTMASK(1);//关闭总中断 NVIC_SystemReset();//请求单片机重启 阅读全文
posted @ 2023-06-05 15:17 阿坦 阅读(148) 评论(0) 推荐(0)
摘要: #include <iostream> #include <windows.h> #include <thread> class SerialPort { public: //构造函数,打开串口并设置参数 SerialPort(const char* portName) { std::string 阅读全文
posted @ 2023-06-01 11:40 阿坦 阅读(61) 评论(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 阿坦 阅读(67) 评论(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 阿坦 阅读(73) 评论(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 阿坦 阅读(389) 评论(0) 推荐(0)
摘要: C++代码示例如下 #include <iostream> #include <vector> #include<cmath> #include <ctime>//eigen核心部分 #include <Eigen/Core>//稠密矩阵的代数运算(逆、特征值等) #include <Eigen/D 阅读全文
posted @ 2023-04-28 14:05 阿坦 阅读(152) 评论(0) 推荐(0)
摘要: //第一种方法是使用循环将所有元素设置为0。 for(int i = 0; i < sizeof(arr)/sizeof(arr[0]); i++){ arr[i] = 0; } //第二种方法是使用cstring库中的memset函数将所有元素设置为0 memset(arr, 0, sizeof( 阅读全文
posted @ 2023-04-23 11:16 阿坦 阅读(2089) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #include <string.h> /// <summary> /// 浮点数转换成十六进制数组CDAB /// </summary> /// <param name="Modbus_HoldReg">返回四位十六进制 阅读全文
posted @ 2023-04-21 15:05 阿坦 阅读(971) 评论(0) 推荐(0)
摘要: private BitmapSource MatToBitmapSource(Mat mat, ref byte[] gray) { PixelFormat pf = PixelFormats.Gray8; int rawStride = (mat.Width * pf.BitsPerPixel + 阅读全文
posted @ 2023-03-06 13:27 阿坦 阅读(90) 评论(0) 推荐(0)
摘要: 裁剪图像 OpenCvSharp.Rect rect = new OpenCvSharp.Rect(4800, 2100, 400, 900);//设置范围 OpenCvSharp.Mat cropped_image = new OpenCvSharp.Mat(Img, rect);//裁剪图像 裁 阅读全文
posted @ 2023-02-27 16:12 阿坦 阅读(774) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页