12 2022 档案

摘要:pyplot, Matplotlib 软件包中子包,提供了一个类似MATLAB的绘图框架。支持 Python 语言。 gridspace:A grid layout to place subplots within a figure.在同一幅图中画多个子图。 class matplotlib.gri 阅读全文
posted @ 2022-12-21 10:51 xinkevinzhang 阅读(40) 评论(0) 推荐(0)
摘要:作用:是控制绘图不显示 在导入matplotlib库后,且在matplotlib.pyplot库被导入前加“matplotlib.use(‘agg’)”语句。 注意matplotlib.use('agg')必须在本句执行import matplotlib.pyplot as plt前运行 阅读全文
posted @ 2022-12-21 09:07 xinkevinzhang 阅读(293) 评论(0) 推荐(0)
摘要:汉明距离是使用在数据传输差错控制编码里面的,汉明距离是一个概念,它表示两个(相同长度)字符串对应位置的不同字符的数量,我们以d(x,y)表示两个字x,y之间的汉明距离。对两个字符串进行异或运算,并统计结果为1的个数,那么这个数就是汉明距离。 You are given two strings of 阅读全文
posted @ 2022-12-09 07:43 xinkevinzhang 阅读(312) 评论(0) 推荐(0)
摘要:Introducing magrittr Stefan Milton Bache November, 2014 Abstract The magrittr (to be pronounced with a sophisticated french accent) package has two ai 阅读全文
posted @ 2022-12-08 15:05 xinkevinzhang 阅读(62) 评论(0) 推荐(0)
摘要:A Forward-Pipe Operator for R #1.基本用法 x %>% f 等价于 f(x) x %>% f(y) 等价于 f(x, y) x %>% f %>% g %>% h 等价于 h(g(f(x))) x %>% f(y, .) 等价于 f(y, x) x %>% f(y, 阅读全文
posted @ 2022-12-08 11:36 xinkevinzhang 阅读(680) 评论(0) 推荐(0)
摘要:参数传递和指定函数表达式 1 参数传递 @适用于定义函数句柄的操作符。 h = @cos >> h(pi) ans = -1 2 指定函数表达式 用法:函数句柄 = @(输入参数列表)运算表达式 产生的函数句柄变量指向运算表达式 h = @(a,x)a(1)*x.^2 + a(2) b = [1,2 阅读全文
posted @ 2022-12-07 14:16 xinkevinzhang 阅读(1330) 评论(0) 推荐(0)