norm表示正态分布:rnorm(x):表示生成随机x个正态分布的序列,randomdnorm(x):输出正态分布的概率密度函数,density function————plot(dnorm(x)),画出密度曲线pnorm(x):输出正态分布的分布函数,概率函数,probability functi...
分类:
其他好文 时间:
2015-08-18 11:28:26
阅读次数:
8185
http://scikit-learn.org/stable/auto_examples/plot_isotonic_regression.html#example-plot-isotonic-regression-py
代码就不贴了,参考上面链接。
给个简单的例子:
问题描述:给定一个无序数字序列y,通过修改每个元素的值得到一个非递减序列 y‘ ,问如何使y和 y’...
分类:
其他好文 时间:
2015-08-17 01:10:17
阅读次数:
174
以数据集robot为例1.打开数据data(robot)2.绘制标准残差图> m1=arima(x = robot, order = c(1, 0, 0))> m2=arima(x = robot, order = c(0, 1, 1))> plot(rstandard(m1),type="o")>...
分类:
编程语言 时间:
2015-08-15 11:35:30
阅读次数:
268
近期使用R绘图遇到两个问题1. 使用不同的字体2. 保存 plot 至 pdf 当字体嵌入pdf (embed the font)使用extrafont和Ghostscript能够解决这两个问题。1. Ghostscript安装:http://www.ghostscript.com/download...
分类:
其他好文 时间:
2015-08-15 09:03:00
阅读次数:
149
Type "load carsmall" to load a sample data set included with MATLAB.Type "boxplot(Horsepower,Origin)" to generate a box plot of auto horsepower groupe...
分类:
其他好文 时间:
2015-08-13 00:53:25
阅读次数:
253
x = c(7,5,8)dim(x)<-3names(x)<-c("apple","banana", "cherry")plot(x, type="b",xaxt="n", xlab="fruits",ylab="number")axis(1,1:3,labels = names(x))#矢量表示x...
分类:
其他好文 时间:
2015-08-11 17:52:21
阅读次数:
227
3.1使用图形 可以使用pdf等函数将图形直接保存在文件中。在运用attach和detach函数的使用中经常出现错误,比如命名重复的问题,所以,应该尽量避免使用这两个函数。 plot是一般的画图函数,hist是直方图,boxplot是箱型图。这些函数会覆盖前面的图形,如何创建多个图形便于同时查看呢?...
分类:
编程语言 时间:
2015-08-09 16:59:13
阅读次数:
181
在MatLab中,我们有时要给画出的点按一定顺序标上序号,下面这个简单的例子实现这个功能:x=rand(1,10);y=rand(1,10);plot(x,y,'r*');text(x+0.02,y,num2cell(1:10));
分类:
其他好文 时间:
2015-08-09 08:23:13
阅读次数:
255
二分答案,转化为判定能否划分成不超过m段,且对每段求最小圆覆盖得到的圆半径不超过mid。对于当前的i,倍增出一个j,使得[i,i+(1#include#include#include#define N 100010using namespace std;int n,m,i,T=50,cnt,ans[...
分类:
其他好文 时间:
2015-08-08 19:41:58
阅读次数:
130
1、fplot()该命令常用来绘制符号函数的图像;其具体格式为: fplot(fun,lims),其中fun是符号函数表达式,lims用来声明绘图区间。例如:绘制函数:f(x)=sinx+x;>> lims=[-5,5]>> fplot('sin(x)+x',lims) 2、plot()命令plot...
分类:
其他好文 时间:
2015-08-08 16:28:29
阅读次数:
138