mathematica里的python bincountt什么意思

python - Numpy bincount() with floats - Stack Overflow
to customize your list.
Join the Stack Overflow Community
Stack Overflow is a community of 6.3 million programmers, just like you, helping each other.
J it only takes a minute:
I am trying to get a bincount of a numpy array which is of the float type:
w = np.array([0.1, 0.2, 0.1, 0.3, 0.5])
print np.bincount(w)
How can you use bincount() with float values and not int?
1,01082233
You want something like this?
&&& from collections import Counter
&&& w = np.array([0.1, 0.2, 0.1, 0.3, 0.5])
&&& c = Counter(w)
Counter({0.0.5: 1, 0.9.00001: 1})
or, more nicely output:
Counter({0.1: 2, 0.5: 1, 0.3: 1, 0.2: 1})
You can then sort it and get your values:
&&& np.array([v for k,v in sorted(c.iteritems())])
array([2, 1, 1, 1])
The output of bincount wouldn't make sense with floats:
&&& np.bincount([10,11])
array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1])
as there is no defined sequence of floats.
85.5k8158196
You need to use numpy.unique before you use bincount. Otherwise it's ambiguous what you're counting. unique should be much faster than Counter for numpy arrays.
&&& w = np.array([0.1, 0.2, 0.1, 0.3, 0.5])
&&& uniqw, inverse = np.unique(w, return_inverse=True)
array([ 0.1,
&&& np.bincount(inverse)
array([2, 1, 1, 1])
14.6k12049
Since version 1.9.0, you can use np.unique directly:
w = np.array([0.1, 0.2, 0.1, 0.3, 0.5])
values, counts = np.unique(w, return_counts=True)
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
Upcoming Events
Stack Overflow works best with JavaScript enabledEnterprise Solutions
Mobile Apps
Engineering, R&D
Web & Software
Finance, Statistics & Business Analysis
Need Help?
Premium Support
Work with Us
Initiatives
WOLFRAM LANGUAGE GUIDE
Alphabetical Listing
The Wolfram Language has over 5000 built-in functions and other objects, all based on a single unified framework, and all carefully designed to work together, both in simple interactive applications and programs of any complexity.
Please complete this field.
Name (optional)
Email address (optional)
Send Feedback
For Customers
Public Resources
Enable JavaScript to interact with content and submit forms on Wolfram websites.1343人阅读
Mathematica
事先声明,本手册既不完整,又不准确。本手册是从Mathematica帮助文档中的MATHEMATICS AND ALGORITHMS和VISUALIZATION AND GRAPHICS中节选,再加上了我的一些翻译而完成。
Shift+Enter用于输入表达式
Crtl+K用于打开输入提示
用于展开代数式
[poly,patt]&&&&&&&&&&& 用变量patt展开多项式poly
[expr]&&&&&&&&&&& 彻底展开表达式
对代数式因式分解
N用于将符号转为数值
&&&&&&&&&&&&& 将表达式expr的x用value替换
&&&&perform several replacements
&&&&&&&&&&&&&&&&&&&& 定义变量x并赋值value
&&&&&&&&&&&&&&&&&&&&&&&&& 将变量x清除
[expr]用于化简表达式
[expr,assum]&&&&&&& simplify &expr &with assumptions
用于更大范围的化简
[expr]&&&&&&&&&&&& 通分
[expr]&&&&&&&&&&&&&&& 部分分式展开
[expr,var]&&&&&& 以变量var对表达式expr进行部分分式展开
[expr]&&&&&&&&&&&&&& 分式约分
[expr,x]&&&&&&&&&&&& 将表达式按x合并同类项
[poly,{x,y,…}]&&&&& arrange a polynomial as a sum of powers of x, y, …
[poly,patt,h]&&&&&&&& apply h to each final coefficientobtained
[expr,x]&&&&&&&& pull out factors that do not depend on &x
[poly]& 提取公因式
[poly,{x,y,…}] pull out any overall factorthat does not depend on x, y, …
[expr]&&&&&&&&&& 三角函数表达式的展开
[expr]&&&&&&&&&& 三角函数表达式的因式分解
[expr]&&&&&&&&&& 三角函数化简
[expr]&&&&&&&&&&& 将三角函数转化为指数形式
[expr]&&&&&&&&&&& 将指数形式转换为三角函数形式
[expr]&&&&&& expand out special and other functions
[expr]&&&&&&& 将表达式按复数展开
[expr]&&&&&&&&& 将(x y)p 转换为xp yp
[expr,-&assum]&& expand out &expr assuming &assum
[x,dom]&&&&&&&&&&&& 声明x属于dom域
[{x1,x2,…},dom]&&&& state that all the &xi are elements of the domain &dom
&&&&&&&&&&&&&&&&&&&& 实数
&&&&&&&&&&&&&&&&& 整数
&&&&&&&&&&&&&&&&&&& 素数
[expr,form]&&&&& 求表达式中变量的系数
[expr,form] 求表达式expr中变量form的最大指数
[expr,n]或expr[[n]] 求表达式expr的第n项
[expr] 求表达式expr的分子
[expr] 求表达式expr的分母
prints with &f[expr] given in default postfixform: &expr//f
&&&&&&&&&&&&&&&&&& 执行command并且不输出
expr//&&&&&&&&&&&&&&& 显示表达式输出的一行
[expr,n]&&&&&&&&&&&&& 显示表达式输出的n行
&&&& 读入文件包
[expr,x]& 使表达式expr以x的嵌套形式展现
[expr,x] 查询expr是否是x的多项式
[expr,{x1,x2,…}]& test whether &expr is a polynomial in the &xi
[poly]& 取得多项式poly的变量
[poly,expr]& 求多项式poly中表达式expr的系数
[poly]&&&& 获取多项式poly的单项式
[poly]& 获取多项式poly的单项式的指数向量和系数
[expr]& 只展开分子
[expr] 只展开分母
[ ,q(x),x]&&& 对于 &,求得
[ ,q(x),x]&&& 对于 &,求得b(x)
[poly1,poly2]& 求最大公约数
[poly,m]&&&&& 化简poly,通过用m减去某多项式的m倍
[poly,-&{a1,a2,…}]& 因式分解是允许引入a1,a2,…
[poly,-&]&
因式分解允许引入代数数
[expr]&&&& 将逻辑函数展开
[expr]& 分段函数展开
[expr,assum]& expand out with the specifiedassumptions
&&&&赋值
&&&判断x和y是否相等
[lhs==rhs,x]& 解方程
&&&&&&&&&& use the list of rules to get values for &x
&&&&&&&&usethe list of rules to get values for an expression
[{lhs1==rhs1,lhs2==rhs2,…},{x,y,…}]&& 解方程组
[eqns,vars,elims]&&&& find solutions for &vars, eliminating the variables &elims
[eqns,vars]& 求使方程恒成立的系数值
[{lhs1==rhs1,lhs2==rhs2,…},{x,…}]& 消元
[eqns,elims]&&&&&& rearrange equations toeliminate the variables &elims
[{lhs1==rhs1,lhs2==rhs2,…},{x,y,…}]&& 化简方程(有时比Solve更强大)
[f,k]&& 代表方程f[x]==0的第k个根
[lhs==rhs,{x,x0}]& 寻找方程的根,从x=x0开始找
[f]& 求反函数
[f,k,n]& the inverse function of the &n-argument function &f with respect to its &k_th argument
[poly,x]& 得到多项式的实根数
关系运算符
&&&&&& unequal(also input as &x &? &y)
&&&大于等于
&&&小于等于
&&all equal
&&&&all unequal (distinct)
x&y&z,etc.&&& strictly decreasing, etc.
逻辑运算符
[p,q,…]&&& 异或
[p,q,…]&&& 与非
[p,q,…]&& 或非
[p,then,else]&&&&& 如果p成立,则执行then,否则执行else
[{ineq1,ineq2,…},x]&& 化简不等式
[{ineq1,ineq2,…},{x1, x2
,…}]&&& reduce a collectionof inequalities in several variables
[{expr1,…,x1?dom1,…},vars]&& explicitly specify individual domains for variables
[expr,vars,dom]&&&&& &&&&reduce &eqns over the domain &dom
[ineqs,{x1,x2,…}]& 找到满足不等式的一个值
[ineqs,vars,n]&&&&&& try to find &n instances
[expr,{x1,x2,…}]&& 求最小值
[{expr,cons},{x1,x2,…}]&& minimize &expr subject to the constraints &cons
[expr,{x1,x2,…}]&& 求最大值
[{expr,cons},{x1,x2,…}]&& maximize &expr subject to the constraints &cons
[f,{i,imin,imax}]& 求累和& the sum
[f,{i,imin,imax,di}]&& the sum with &i increasing in steps of &di
[f,{i,imin,imax},{j,jmin,jmax}]&&& the nested sum&
[f,{i,imin,imax}]& 求累积 &&
&&表示无穷
[expr,{x,x0,n}]&&& 级数展开& find the power seriesexpansion of &expr about the point &x=x0 to at most &n_th order
[expr,{x,x0,nx},{y,y0,ny}]&&& find series expansions with respect to &y, then &x
[series]&&&&&&&&&&&&& truncate a power series to give an ordinary expression
[eqn,a[n],n]&&&& 解递归方程
[{eqn1,eqn2,…},{a1[n],a2[n],…},n]& solve a coupled system ofrecurrence equations
[eqns,a[n1,n2,…],{n1,n2,…}]&&& solve partial recurrenceequations
[expr,x-&x0]& 求极限& find the limit of &expr when &x approaches &x0
[expr,x-&x0,-&1]& 求左极限
[expr,x-&x0,-&-1]& 求右极限
[expr,{x,x0}]&& 求留数&& the residue of &expr when &x equals &x0
[f,x]&& 求偏导数 partial derivative
[f,x,y,…]&& multiple derivative
[f,{x,n}]& 求n阶偏导数&&&&&& &derivative
[f]&& 求全微分df
[f,x]& 求全微分
[f,x,y,…]&& multiple total derivative
[f,x,-&{c1,c2,…}]&&& total derivative with &ci constant
(i.e., &d ci=0)
y/:[y,x]=0&&& set &
[c,]&& define &c to be a constant in all cases
[f,x]&& 求f的不定积分
[f,x,y]& the multiple integral
[f,{x,xmin,xmax}]& 求定积分
[f,{x,xmin,xmax},{y,ymin,ymax}]& the multiple integral
[cond],{x,xmin,xmax},{y,ymin,ymax}]& integrate &f over the region where &cond &is &
[eqn,y[x],x] 解微分方程& solve a differential equationfor &y[x]
[eqn,y,x]&&&& solve a differential equationfor the function &y
[{eqn1,eqn2,…},{y1,y2,…},x]&&& solve a list of differentialequations
[eqn,y[x1,x2,…],{x1,x2,…}]&&&&& solve a partial differentialequation for &y[x1,x2,…]
[eqn,y,{x1,x2,…}]&&&&& solve a partial differentialequation for the function &y
[expr,t,s]& 求拉普拉斯变换
[expr,s,t]&& 求拉普拉斯反变换
[expr,{t1,t2,…},{s1,s2,…}]& the multidimensional Laplacetransform of &expr
[expr,{s1,s2,…},{t1,t2,…}]&& the multidimensional inverseLaplace transform of &expr
[expr,t,w]& 傅里叶变换
[expr,w,t]& 傅里叶反变换
通过设置FourierParameters,可设置傅里叶变换的算法
[expr,t,w]& Fourier sine transform
[expr,t,w]& Fourier cosine transform
[expr,w,t]& inverse Fourier sine transform
[expr,w,t]&& inverse Fourier cosinetransform
[expr,n,z]& Z变换
[expr,z,n]&& Z反变换
[x]& 冲激函数& Dirac delta function d(x)
[x]& 类似阶跃函数&& Heaviside theta function q(x), equal to 0 for x&0 and 1 for x&0
[x1,x2,…]& multidimensional Dirac deltafunction
[x1,x2,…]& multidimensional Heavisidetheta function
[n1,n2,…]&& discrete delta d(n1,n2,…)
[n1,n2,…]&& Kronecker delta
[ ]& 求平均值
[{{x1,y1,…},{x2,y2,…},…}]&& a list of the means of the &xi,yi,…
[list]& 求中间值
[list]& 求最大值
[list]& 求方差
[list]& 求标准差
[data,q]&& 求分位数& gives the location before which(100q) percent of the data lie
[data]& list of the elements withhighest frequency
[data]& 求绝对平均差
[data]& 中间数平均差&& median absolute deviation,median of ?xi-median? values
[v1,v2]& 求协方差
[v1,v2]& 求相关系数
[f[x],xélist]& 求期望 && (可以通过Esc
dist Esc来打出é)
[n,p]& 产生试验次数为n,每次实验成功的概率为p的二项分布
[p]& 产生成功概率为p的两点分布
[m,s] 产生正态分布
[dist,x]&& 求概率密度函数
[data]&& partition &data into lists of similarelements
[data,n]& partition &data into exactly &n lists of similar elements
[{elem1,elem2,…},x]& 求最接近值& give the list of &elemi to which &x is nearest
[{y1,y2,…},{f1,f2,…},x]&& fit the values &yn to a linear combination offunctions &fi
[{{x1,y1},{x2,y2},…},{f1, f2,…},x]& fit the points &(xn,yn) to a linear combination
[data,form,{p1,p2,…},x]&& find a fit to &form with parameters &pi
[data]&& 数值的傅里叶变换
[data]&& 数值的傅里叶反变换
[{f1,f2,…},{fun1,fun2,…},x]&& 曲线拟合& find a linear combination ofthe &funi that best fits the values &fi
[data,{fun1,fun2,…},{x,y,…}]&& fit to a function of severalvariables
[data,form,{par1,par2,…},x]&&& search for values of the &pari that make
&form best fit &data
[data,form,pars,{x,y,…}]& fit multivariate data
&&&& finds a best fit subject tothe parameter constraints
[{f1,f2,…}]&& construct an approximatefunction with values &fi at
successive integers
[{{x1,f1},{x2,f2},…}]&& 求近似函数construct an approximatefunction with values &fi at points &xi
[{u1,u2,…,un}]& 离散傅里叶变换
[{v1,v2,…,vn}]&& 离散傅里叶反变换
[{{u11,u12,…},{u21,u22,…},…}]&& two-dimensional discreteFourier transform
[list]&& Fourier discrete cosinetransform of a list of real numbers
[list]&& Fourier discrete sinetransform of a list of real numbers
[list,m]& Fourier discrete cosinetransform of type &m
[list,m]& Fourier discrete sinetransform of type &m
[f,{x,xmin,xmax}]&& 绘图& plot &f as a function of &x from &xmin to &xmax
[f,{x,x0,x1,…,xk}]& plot &f over a series of segments,potentially breaking the curve at each of the &xi
[plot,option-&value]& 重画& redraw a plot with optionschanged
[plot1,plot2,…]&& 联合绘图& combine several plots
[{{plot1,plot2,…},…}]&&& draw an array of plots
[plot]&&&&&& show the underlying textualdescription of the plot
[f,{x,xmin,xmax},{y,ymin,ymax}] 画三维图 make a three-dimensional plotof &f as a function of thevariables &x and &y
[{y1,y2,…}]& 画点图&& plot &y1,y2,… at &x values &1,2,…
[{{x1,y1},{x2,y2},…}]&&& plot points &(x1,y1),…
[list]& join the points with lines
[{{z11,z12,…},{z21,z22,…},…}]&& make a three-dimensional plotof the array of heights &zyx
[{{x1,y1,z1},{x2,y2,z2},…}]&& make a three-dimensional plotwith heights &zi at
positions &{xi,yi}
[array]&& make a contour plot
[array]&& make a density plot
[{fx,fy},{t,tmin,tmax}] 参数绘图
[{{fx,fy},{gx,gy},…},{t,tmin,tmax}]& plot several parametric curvestogether
[{fx,fy,fz},{t,tmin,tmax}]& make a parametric plot of athree-dimensional curve
[{fx,fy,fz},{t,tmin,tmax},{u,umin,umax}]& make a parametric plot of
athree-dimensional surface
[{{fx,fy,fz},{gx,gy,gz},…},…]& plot several objects together
[f,{t,0,tmax}]& 播放函数的声音& play a sound with amplitude &f as a function of time &t in seconds
[f,{t,0,tmax},-&r]&&& play a sound, sampling it &r times a second
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:15565次
排名:千里之外
原创:15篇
(1)(1)(2)(1)(1)(1)(1)(1)(1)(1)(1)(3)(1)Enterprise Solutions
Mobile Apps
Engineering, R&D
Web & Software
Finance, Statistics & Business Analysis
Need Help?
Premium Support
Work with Us
Initiatives
WOLFRAM LANGUAGE GUIDE
List Manipulation
Lists are central constructs in the Wolfram Language, used to represent collections, arrays, sets, and sequences of all kinds. Lists can have any structure and size and can routinely involve even millions of elements. Well over a thousand built-in functions throughout the Wolfram Language operate directly on lists, making lists a powerful vehicle for interoperability.
() & specify a list explicitly
& make a table of values of an expression
& make an array of any dimension from a function
 &▪&  &▪&  &▪&  &▪&  &▪&  &▪&  &▪&
& parts or sequences of parts (;;), resettable with =
 &▪&  &▪&  &▪&  &▪&  &▪&  &▪&  &▪&
& select according to a function
& give cases matching a pattern
 &▪&  &▪&  &▪&  &▪&
& an element automatically removed from lists
Finding Sublists
 &▪&  &▪&
& flatten out nested lists
 &▪&  &▪&  &▪&  &▪&  &▪&  &▪&  &▪&  &▪&
() — map a function over a list: f/@{a,b,c}⟶{f[a],f[b],f[c]}
(, ) — apply a function to a list: f@@{a,b,c}⟶f[a,b,c]
 &▪&  &▪&  &▪&  &▪&  &▪&  &▪&
Predicates on Lists
 &▪&  &▪&
 &▪&  &▪&  &▪&  &▪&
{…}+{…}, etc. — automatically operate in parallel on list elements
 &▪&  &▪&  &▪&  &▪&  &▪&  &▪&
 &▪&  &▪&  &▪&  &▪&  &▪&
 &▪&  &▪&  &▪&  &▪&  &▪&
 &▪&  &▪&  &▪&
Please complete this field.
Name (optional)
Email address (optional)
Send Feedback
For Customers
Public Resources
Enable JavaScript to interact with content and submit forms on Wolfram websites.Mathematica函数速查手册_电工电气_中国百科网
Mathematica函数速查手册
    事先声明,本手册既不完整,又不准确。本手册是从Mathematica帮助文档中的MATHEMATICS AND ALGORITHMS和VISUALIZATION AND GRAPHICS中节选,再加上了我的一些翻译而完成。
Shift+Enter用于输入表达式
Crtl+K用于打开输入提示
用于展开代数式
Expand[poly,patt] 用变量patt展开多项式poly
ExpandAll[expr] 彻底展开表达式
对代数式因式分解
N用于将符号转为数值
将表达式expr的x用value替换
perform several replacements
定义变量x并赋值value
将变量x清除
Simplify[expr]用于化简表达式
Simplify[expr,assum] simplify expr with assumptions
FullSimplify用于更大范围的化简
Together[expr] 通分
Apart[expr] 部分分式展开
Apart[expr,var] 以变量var对表达式expr进行部分分式展开
Cancel[expr] 分式约分
Collect[expr,x] 将表达式按x合并同类项
Collect[poly,{x,y,…}] arrange a polynomial as a sum of powers of x, y, …
Collect[poly,patt,h] apply h to each final coefficientobtained
FactorTerms[expr,x] pull out factors that do not depend on x
FactorTerms[poly] 提取公因式
FactorTerms[poly,{x,y,…}] pull out any overall factorthat does not depend on x, y, …
TrigExpand[expr] 三角函数表达式的展开
TrigFactor[expr] 三角函数表达式的因式分解
TrigReduce[expr] 三角函数化简
TrigToExp[expr] 将三角函数转化为指数形式
ExpToTrig[expr] 将指数形式转换为三角函数形式
FunctionExpand[expr] expand out special and other functions
ComplexExpand[expr] 将表达式按复数展开
PowerExpand[expr] 将(x y)p 转换为xp yp
PowerExpand[expr,Assumptions-&assum] expand out expr assuming assum
Element[x,dom] 声明x属于dom域
Element[{x1,x2,…},dom] state that all the xi are elements of the domain dom
Reals 实数
Integers 整数
Primes 素数
Coefficient[expr,form] 求表达式中变量的系数
Exponent[expr,form] 求表达式expr中变量form的最大指数
Part[expr,n]或expr[[n]] 求表达式expr的第n项
Numerator[expr] 求表达式expr的分子
Denominator[expr] 求表达式expr的分母
Postfix[f[expr]]
prints with f[expr] given in default postfixform: expr//f
执行command并且不输出
expr//Short 显示表达式输出的一行
Short[expr,n] 显示表达式输出的n行
读入文件包
HornerForm[expr,x] 使表达式expr以x的嵌套形式展现
PolynomialQ[expr,x] 查询expr是否是x的多项式
PolynomialQ[expr,{x1,x2,…}] test whether expr is a polynomial in the xi
Variables[poly] 取得多项式poly的变量
Coefficient[poly,expr] 求多项式poly中表达式expr的系数
MonomialList[poly] 获取多项式poly的单项式
CoefficientRules[poly] 获取多项式poly的单项式的指数向量和系数
ExpandNumerator[expr] 只展开分子
ExpandDenominator[expr] 只展开分母
PolynomialQuotient[ ,q(x),x] 对于 ,求得
PolynomialRemainder[ ,q(x),x] 对于 ,求得b(x)
PolynomialGCD[poly1,poly2] 求最大公约数
PolynomialMod[poly,m] 化简poly,通过用m减去某多项式的m倍
Factor[poly,Extension-&{a1,a2,…}] 因式分解是允许引入a1,a2,…
Factor[poly,Extension-&Automatic]
因式分解允许引入代数数
LogicalExpand[expr] 将逻辑函数展开
PiecewiseExpand[expr] 分段函数展开
PiecewiseExpand[expr,assum] expand out with the specifiedassumptions
赋值
判断x和y是否相等
Solve[lhs==rhs,x] 解方程
use the list of rules to get values for x
usethe list of rules to get values for an expression
Solve[{lhs1==rhs1,lhs2==rhs2,…},{x,y,…}] 解方程组
Solve[eqns,vars,elims] find solutions for vars, eliminating the variables elims
SolveAlways[eqns,vars] 求使方程恒成立的系数值
Eliminate[{lhs1==rhs1,lhs2==rhs2,…},{x,…}] 消元
Eliminate[eqns,elims] rearrange equations toeliminate the variables elims
Reduce[{lhs1==rhs1,lhs2==rhs2,…},{x,y,…}] 化简方程(有时比Solve更强大)
Root[f,k] 代表方程f[x]==0的第k个根
FindRoot[lhs==rhs,{x,x0}] 寻找方程的根,从x=x0开始找
InverseFunction[f] 求反函数
InverseFunction[f,k,n] the inverse function of the n-argument function f with respect to its k_th argument
CountRoots[poly,x] 得到多项式的实根数
关系运算符
unequal(also input as x 1 y)
all unequal (distinct)
x&y&z,etc. strictly decreasing, etc.
逻辑运算符
Xor[p,q,…] 异或
Nand[p,q,…] 与非
Nor[p,q,…] 或非
If[p,then,else] 如果p成立,则执行then,否则执行else
Reduce[{ineq1,ineq2,…},x] 化简不等式
Reduce[{ineq1,ineq2,…},{x1, x2
,…}] reduce a collectionof inequalities in several variables
Reduce[{expr1,…,x1?dom1,…},vars] explicitly specify individual domains for variables
Reduce[expr,vars,dom] reduce eqns over the domain dom
FindInstance[ineqs,{x1,x2,…}] 找到满足不等式的一个值
FindInstance[ineqs,vars,n] try to find n instances
Minimize[expr,{x1,x2,…}] 求最小值
Minimize[{expr,cons},{x1,x2,…}] minimize expr subject to the constraints cons
Maximize[expr,{x1,x2,…}] 求最大值
Maximize[{expr,cons},{x1,x2,…}] maximize expr subject to the constraints cons
Sum[f,{i,imin,imax}] 求累和 the sum
Sum[f,{i,imin,imax,di}] the sum with i increasing in steps of di
Sum[f,{i,imin,imax},{j,jmin,jmax}] the nested sum
Product[f,{i,imin,imax}] 求累积
Series[expr,{x,x0,n}] 级数展开 find the power seriesexpansion of expr about the point x=x0 to at most n_th order
Series[expr,{x,x0,nx},{y,y0,ny}] find series expansions with respect to y, then x
Normal[series] truncate a power series to give an ordinary expression
RSolve[eqn,a[n],n] 解递归方程
RSolve[{eqn1,eqn2,…},{a1[n],a2[n],…},n] solve a coupled system ofrecurrence equations
RSolve[eqns,a[n1,n2,…],{n1,n2,…}] solve partial recurrenceequations
Limit[expr,x-&x0] 求极限 find the limit of expr when x approaches x0
Limit[expr,x-&x0,Direction-&1] 求左极限
Limit[expr,x-&x0,Direction-&-1] 求右极限
Residue[expr,{x,x0}] 求留数 the residue of expr when x equals x0
D[f,x] 求偏导数 partial derivative
D[f,x,y,…] multiple derivative
D[f,{x,n}] 求n阶偏导数 derivative
Dt[f] 求全微分df
Dt[f,x] 求全微分
Dt[f,x,y,…] multiple total derivative
Dt[f,x,Constants-&{c1,c2,…}] total derivative with ci constant
(i.e., d ci=0)
y/:Dt[y,x]=0 set
SetAttributes[c,Constant] define c to be a constant in all cases
Integrate[f,x] 求f的不定积分
Integrate[f,x,y] the multiple integral
Integrate[f,{x,xmin,xmax}] 求定积分
Integrate[f,{x,xmin,xmax},{y,ymin,ymax}] the multiple integral
Integrate[f
Boole[cond],{x,xmin,xmax},{y,ymin,ymax}] integrate f over the region where cond is True
DSolve[eqn,y[x],x] 解微分方程 solve a differential equationfor y[x]
DSolve[eqn,y,x] solve a differential equationfor the function y
DSolve[{eqn1,eqn2,…},{y1,y2,…},x] solve a list of differentialequations
DSolve[eqn,y[x1,x2,…],{x1,x2,…}] solve a partial differentialequation for y[x1,x2,…]
DSolve[eqn,y,{x1,x2,…}] solve a partial differentialequation for the function y
LaplaceTransform[expr,t,s] 求拉普拉斯变换
InverseLaplaceTransform[expr,s,t] 求拉普拉斯反变换
LaplaceTransform[expr,{t1,t2,…},{s1,s2,…}] the multidimensional Laplacetransform of expr
InverseLaplaceTransform[expr,{s1,s2,…},{t1,t2,…}] the multidimensional inverseLaplace transform of expr
FourierTransform[expr,t,w] 傅里叶变换
InverseFourierTransform[expr,w,t] 傅里叶反变换
通过设置FourierParameters,可设置傅里叶变换的算法
FourierSinTransform[expr,t,w] Fourier sine transform
FourierCosTransform[expr,t,w] Fourier cosine transform
InverseFourierSinTransform[expr,w,t] inverse Fourier sine transform
InverseFourierCosTransform[expr,w,t] inverse Fourier cosinetransform
ZTransform[expr,n,z] Z变换
InverseZTransform[expr,z,n] Z反变换
DiracDelta[x] 冲激函数 Dirac delta function d(x)
HeavisideTheta[x] 类似阶跃函数 Heaviside theta function q(x), equal to 0 for x&0 and 1 for x&0
DiracDelta[x1,x2,…] multidimensional Dirac deltafunction
HeavisideTheta[x1,x2,…] multidimensional Heavisidetheta function
DiscreteDelta[n1,n2,…] discrete delta d(n1,n2,…)
KroneckerDelta[n1,n2,…] Kronecker delta
Mean[ ] 求平均值
Mean[{{x1,y1,…},{x2,y2,…},…}] a list of the means of the xi,yi,…
Median[list] 求中间值
Max[list] 求最大值
Variance[list] 求方差
StandardDeviation[list] 求标准差
Quantile[data,q] 求分位数 gives the location before which(100q) percent of the data lie
Commonest[data] list of the elements withhighest frequency
MeanDeviation[data] 求绝对平均差
MedianDeviation[data] 中间数平均差 median absolute deviation,median of èxi-medianè values
Covariance[v1,v2] 求协方差
Correlation[v1,v2] 求相关系数
Expectation[f[x],xélist] 求期望 (可以通过Esc
dist Esc来打出é)
BinomialDistribution[n,p] 产生试验次数为n,每次实验成功的概率为p的二项分布
BernoulliDistribution[p] 产生成功概率为p的两点分布
NormalDistribution[m,s] 产生正态分布
PDF[dist,x] 求概率密度函数
FindClusters[data] partition data into lists of similarelements
FindClusters[data,n] partition data into exactly n lists of similar elements
Nearest[{elem1,elem2,…},x] 求最接近值 give the list of elemi to which x is nearest
Fit[{y1,y2,…},{f1,f2,…},x] fit the values yn to a linear combination offunctions fi
Fit[{{x1,y1},{x2,y2},…},{f1, f2,…},x] fit the points (xn,yn) to a linear combination
FindFit[data,form,{p1,p2,…},x] find a fit to form with parameters pi
Fourier[data] 数值的傅里叶变换
InverseFourier[data] 数值的傅里叶反变换
Fit[{f1,f2,…},{fun1,fun2,…},x] 曲线拟合 find a linear combination ofthe funi that best fits the values fi
Fit[data,{fun1,fun2,…},{x,y,…}] fit to a function of severalvariables
FindFit[data,form,{par1,par2,…},x] search for values of the pari that make
form best fit data
FindFit[data,form,pars,{x,y,…}] fit multivariate data
finds a best fit subject tothe parameter constraints
Interpolation[{f1,f2,…}] construct an approximatefunction with values fi at
successive integers
Interpolation[{{x1,f1},{x2,f2},…}] 求近似函数construct an approximatefunction with values fi at points xi
Fourier[{u1,u2,…,un}] 离散傅里叶变换
InverseFourier[{v1,v2,…,vn}] 离散傅里叶反变换
Fourier[{{u11,u12,…},{u21,u22,…},…}] two-dimensional discreteFourier transform
FourierDCT[list] Fourier discrete cosinetransform of a list of real numbers
FourierDST[list] Fourier discrete sinetransform of a list of real numbers
FourierDCT[list,m] Fourier discrete cosinetransform of type m
FourierDST[list,m] Fourier discrete sinetransform of type m
Plot[f,{x,xmin,xmax}] 绘图 plot f as a function of x from xmin to xmax
Plot[f,{x,x0,x1,…,xk}] plot f over a series of segments,potentially breaking the curve at each of the xi
Show[plot,option-&value] 重画 redraw a plot with optionschanged
Show[plot1,plot2,…] 联合绘图 combine several plots
GraphicsGrid[{{plot1,plot2,…},…}] draw an array of plots
InputForm[plot] show the underlying textualdescription of the plot
Plot3D[f,{x,xmin,xmax},{y,ymin,ymax}] 画三维图 make a three-dimensional plotof f as a function of thevariables x and y
ListPlot[{y1,y2,…}] 画点图 plot y1,y2,… at x values 1,2,…
ListPlot[{{x1,y1},{x2,y2},…}] plot points (x1,y1),…
ListLinePlot[list] join the points with lines
ListPlot3D[{{z11,z12,…},{z21,z22,…},…}] make a three-dimensional plotof the array of heights zyx
ListPlot3D[{{x1,y1,z1},{x2,y2,z2},…}] make a three-dimensional plotwith heights zi at
positions {xi,yi}
ListContourPlot[array] make a contour plot
ListDensityPlot[array] make a density plot
ParametricPlot[{fx,fy},{t,tmin,tmax}] 参数绘图
ParametricPlot[{{fx,fy},{gx,gy},…},{t,tmin,tmax}] plot several parametric curvestogether
ParametricPlot3D[{fx,fy,fz},{t,tmin,tmax}] make a parametric plot of athree-dimensional curve
ParametricPlot3D[{fx,fy,fz},{t,tmin,tmax},{u,umin,umax}] make a parametric plot of
athree-dimensional surface
ParametricPlot3D[{{fx,fy,fz},{gx,gy,gz},…},…] plot several objects together
Play[f,{t,0,tmax}] 播放函数的声音 play a sound with amplitude f as a function of time t in seconds
Play[f,{t,0,tmax},SampleRate-&r] play a sound, sampling it r times a second
(作者:侠客 编辑:刘平仲)
文章热词:傅里叶曲线拟合
嵌入式面试 01
最全Matlab
延伸阅读:
PIC 单片机
PIC单片机是一种用来开发去控制外围的集成电路(IC)。Periphe
01-11protel
01-11供电基础
05-18proteus
PWM技术控制方法
51单片机P1口八个LED灯做三路流水灯
第十八课:51单片机的延时及时序分析
霍尔开关在铝电解天车自动兑料对位中的应用
采用SPI的高速ADC双线控制电路
ADuC812中A/D转换器的安全应用
FPGA设计中关键问题的研究
基于MSP430的三相电能表SA9904B采集
单片机通信性能分析和评价方法
MAX115在电网数据采集系统中的应用
高校自动化网关于我们广告服务友情链接
网站地图版权申明
中国高校自动化网 All Rights Reserved.
互联网违法和不良信息举报
收录时间:日 11:36:15 来源:高校自动化网 作者:匿名
上一篇: &(&&)
创建分享人
喜欢此文章的还喜欢
Copyright by ;All rights reserved. 联系:QQ:

我要回帖

更多关于 count什么意思 的文章

 

随机推荐