tongqingliu

保持学习的态度

2017年5月22日 #

python基于pillow库的简单图像处理

摘要: from PIL import Image from PIL import ImageFilter from PIL import ImageEnhance import matplotlib.pyplot as plt # 将彩色图片转成灰度图片 img = Image.open('pic.jpg') # 读取图片 gray = img.convert('L') # 转成灰度图 plt.f... 阅读全文

posted @ 2017-05-22 21:16 tongqingliu 阅读(512) 评论(0) 推荐(0) 编辑

python基于matplotlib绘图

摘要: pic1.png pic2.png pic3.png pic4.png pic5.png pic6.png 阅读全文

posted @ 2017-05-22 21:11 tongqingliu 阅读(492) 评论(0) 推荐(0) 编辑

python读取并写入mat文件

摘要: 用matlab生成一个示例mat文件: 用python3读取并写入mat文件: 阅读全文

posted @ 2017-05-22 21:06 tongqingliu 阅读(31451) 评论(1) 推荐(2) 编辑

windows下解决numpy, scipy等库安装失败的方法

摘要: 如果pip安装scipy库失败,可以参考以下方法: scipy官方上提供了这样的方法: Windows packages Windows does not have any package manager analogous to that in Linux, so installing one o 阅读全文

posted @ 2017-05-22 20:56 tongqingliu 阅读(1691) 评论(0) 推荐(0) 编辑

2017年5月16日 #

Latex中图表位置的控制

摘要: \begin{figure}[!htbp] 其中htbp是可选的,它们分别代表 !-忽略“美学”标准 h-here t-top b-bottom p-page-of-its-own \begin{figure}[!htbp] 其中htbp是可选的,它们分别代表 !-忽略“美学”标准 h-here t 阅读全文

posted @ 2017-05-16 19:01 tongqingliu 阅读(22128) 评论(0) 推荐(0) 编辑

2017年5月11日 #

python一键升级所有第三方库

摘要: 可以根据自己需要,修改pip命令 另外,注意要在root权限下进行 阅读全文

posted @ 2017-05-11 16:28 tongqingliu 阅读(3052) 评论(0) 推荐(0) 编辑

2017年5月10日 #

Python之turtle库

摘要: 在命令行下```python -m pip install turtle``` 大致有两种命令: 运动命令: 画笔控制命令: 绘制填充三角形 绘制填充五边形 以此类推,可以绘制N边形 绘制正方形 绘制五角星 绘制心形 添加文字 阅读全文

posted @ 2017-05-10 10:02 tongqingliu 阅读(656) 评论(0) 推荐(0) 编辑

2017年4月22日 #

C++函数的传值调用&指针调用&引用调用

摘要: [TOC] 传值调用 该方法把参数的实际值复制给函数的形式参数。在这种情况下,修改函数内的形式参数对实际参数没有影响。 c++ include using namespace std; // 函数声明 void swap(int x, int y); int main () { // 局部变量声明 阅读全文

posted @ 2017-04-22 22:57 tongqingliu 阅读(2708) 评论(0) 推荐(0) 编辑

2017年4月19日 #

文件管理及代码命名规范

摘要: 开始尝试一种新的文件夹命名规范 一级文件夹 01文件名_20170419、02文件名_20170419、03文件名_20170419、……、010文件名_20170419、011文件名_20170419 二级文件夹 001文件名_20170419、002文件名_20170419、003文件名_201 阅读全文

posted @ 2017-04-19 10:02 tongqingliu 阅读(2331) 评论(0) 推荐(0) 编辑

2017年4月14日 #

python(1)在windows8.1下搭建python27和python36环境

摘要: 去Python官网下载需要的Python版本 https://www.python.org/ 我下载的是下面这两个版本: Python 2.7.13 Python 3.6.1 安装Python27时,设置安装路径为 ,设置添加到路径,安装非常顺利。 安装Python36时,设置安装路径为 ,设置添加 阅读全文

posted @ 2017-04-14 16:43 tongqingliu 阅读(778) 评论(0) 推荐(1) 编辑

2017年4月12日 #

Matlab绘图添加直角坐标轴

摘要: 绘制y=x^2,并添加直角坐标轴。 阅读全文

posted @ 2017-04-12 23:44 tongqingliu 阅读(10035) 评论(0) 推荐(0) 编辑

2017年3月24日 #

MATLAB拟合正态分布

摘要: 得到对应的参数为 均方误差为 阅读全文

posted @ 2017-03-24 22:26 tongqingliu 阅读(26507) 评论(3) 推荐(0) 编辑

Matlab文件操作

摘要: ```matlab clear;clc; A = magic(4); fid = fopen('test.txt','wt'); for i = 1:size(A,1) for j = 1:size(A,2) fprintf(fid,'%d\t',A(i,j)); end fprintf(fid,'\n'); end clear; A = importda... 阅读全文

posted @ 2017-03-24 22:13 tongqingliu 阅读(162) 评论(0) 推荐(0) 编辑

Ubuntu安装spyder并添加快捷方式

摘要: Ubuntu安装spyder并添加快捷方式 之前通过 ~~sudo apt install spyder~~ ~~sudo apt install spyder3~~ 安装spyder,但是这样有个坏处,编译器只能用系统自带的python。 终端输入spyder3,就可以打开spyder了。 但是, 阅读全文

posted @ 2017-03-24 15:51 tongqingliu 阅读(3544) 评论(0) 推荐(0) 编辑

2017年3月15日 #

Matlab作图

摘要: 修改线宽 在xlabel,ylabel,title中使用latex语言 保存图片 阅读全文

posted @ 2017-03-15 11:10 tongqingliu 阅读(132) 评论(0) 推荐(0) 编辑

2017年3月13日 #

readme

摘要: 加密博文只是暂时利益相关的小代码 阅读全文

posted @ 2017-03-13 17:44 tongqingliu 阅读(85) 评论(0) 推荐(0) 编辑

ADALINE小demo

摘要: 线性逼近 matlab clear;clc;close all x = [1,0.5; 1.5,1.1; 3,3; 1.2, 1]; y = x(:,2); x = [ones(size(x,1),1),x(:,1)]; w0 = [0.2;1]; ita = 0.1; tol = 0.608; % 阅读全文

posted @ 2017-03-13 17:43 tongqingliu 阅读(131) 评论(0) 推荐(0) 编辑

Matlab用mpeaks函数求峰值点坐标

摘要: ```matlab clear;clc;close all % 初始化 m = [-6,-2,0,2,4,6]; sigma = [1,1,0.5,0.25,0.6,2]; h = [1,2,3,2,2.13,3.14]; x=-10:0.01:10; sumy = zeros(1,length(x)); % 绘制各分支高斯信号 figure; for i = 1:length(m) y=... 阅读全文

posted @ 2017-03-13 13:56 tongqingliu 阅读(2470) 评论(0) 推荐(0) 编辑

2017年3月12日 #

Python处理股票数据

该文被密码保护。 阅读全文

posted @ 2017-03-12 16:09 tongqingliu 阅读(2) 评论(0) 推荐(0) 编辑

2017年2月24日 #

MATLAB二分法函数求根

摘要: function xc = bisect(f,a,b,tol) ind = b-a; while ind > tol xx = (a+b)/2; if f(a)*f(xx) < 0 b = xx; else a = xx; end ind = b - a; end xc = xx; 阅读全文

posted @ 2017-02-24 13:31 tongqingliu 阅读(6204) 评论(0) 推荐(0) 编辑

导航