上一页 1 2 3 4 5 6 ··· 8 下一页

2017年4月15日

python 画图二(三维图,多轴图)

摘要: import sys reload(sys) sys.setdefaultencoding('utf-8') import matplotlib.pyplot as plt import numpy as np plt.figure(1)#实例化作图变量 plt.title("single variable")#图像标题 plt.xlabel('x') plt.ylabel('y') plt... 阅读全文

posted @ 2017-04-15 21:07 Kermit.Li 阅读(10488) 评论(0) 推荐(0) 编辑

2017年4月11日

葵花托盘

摘要: %% load datan=1:600;D =1.;C = 2.2;a = 53/180 * pi; theaN=n * a;Rn = C * sqrt(n);count = 100;%%为设置小圆内黑点数%% 极坐标投影直角坐标 x = Rn .* cos(theaN);y = Rn .* sin 阅读全文

posted @ 2017-04-11 20:34 Kermit.Li 阅读(628) 评论(0) 推荐(0) 编辑

2016年12月12日

python 画图

摘要: import matplotlib.pyplot as plt L = [[2,2],[3,2],[1.75,1],[2, 1],[2.25, 1],[2.5, 1]] plt.title('I am a scatter diagram') plt.xlim(xmax = 7, xmin = 0) plt.ylim(ymax = 7, ymin = 0) plt.annotate("(1, 6)... 阅读全文

posted @ 2016-12-12 15:16 Kermit.Li 阅读(242) 评论(0) 推荐(0) 编辑

2016年11月26日

matlab线性规划

摘要: clc; clear all; close all; %% =========linprog()========= % min(z) =cX %st. AX <=b % Aeq <=beq; %%========================= c= [3, -1, -1]; A = [1,-2,1;4,-1,-1]; b = [1,-3]; Aeq = [-2,0,1]; beq =... 阅读全文

posted @ 2016-11-26 11:04 Kermit.Li 阅读(1329) 评论(0) 推荐(0) 编辑

2016年11月3日

matlab中fminbnd函数求最小或者组大值

摘要: clc; clear all; close all; fx = @(x) -(0.4./sqrt(1 + x.^2) - sqrt(1+x.^2) .* (1- 0.4./(1 + x.^2))+x); [x0, f] =fminbnd(fx,0,2); % f利用负号求最小值 x = 0 :0.1: 2; y = feval(fx,x); %% ========maxvalue==== f... 阅读全文

posted @ 2016-11-03 09:50 Kermit.Li 阅读(7362) 评论(0) 推荐(0) 编辑

2016年11月2日

正方形和球体,利用蒙特卡洛计算pi值

摘要: clc; clear all; close all; R = 3; time = 10000; origin = [0,0,0]; %%======绘制球体====== t=linspace(0,pi,25); p=linspace(0,2*pi,25); [theta,phi]=meshgrid(t,p); x=R * sin(theta).*sin(phi) + origin(1); y... 阅读全文

posted @ 2016-11-02 21:22 Kermit.Li 阅读(515) 评论(0) 推荐(0) 编辑

2016年10月17日

R平方回归平方推导

摘要: 阅读全文

posted @ 2016-10-17 14:30 Kermit.Li 阅读(580) 评论(0) 推荐(0) 编辑

2016年9月19日

python 利用cvxopt线性规划

摘要: from cvxopt import matrix, solvers ######################################################################## ## mimimize 2 x1 + x2 ## subject to ## -x1 阅读全文

posted @ 2016-09-19 11:38 Kermit.Li 阅读(4975) 评论(0) 推荐(0) 编辑

2016年9月13日

K-NN(最近邻分类算法 python

摘要: # algorithm:K-NN(最近邻分类算法)# author:Kermit.L# time: 2016-8-7 # from numpy import *import operatorimport matplotlib.pyplot as plt def creatDataSet(): gro 阅读全文

posted @ 2016-09-13 09:59 Kermit.Li 阅读(1365) 评论(0) 推荐(0) 编辑

2016年9月11日

序列匹配,动态规划

摘要: #============================================================================== # 序列对比,动态规划 #============================================================================== def LCS(str1,str2): C =... 阅读全文

posted @ 2016-09-11 20:06 Kermit.Li 阅读(488) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 ··· 8 下一页

导航