matlab求COPULA偏导,matlab note

Update date:2018-01-05

Matlab Note

1 vine-copula

1.1 xlsread()

打开xlsx里面的数据

S3CE = xlsread('电表建模数据.xlsx','S3CE',‘G2:G52’)

1.2常见希腊发音总结

7318d44d8517

image.png

3.prob()

连乘

由于matlab中的元素是以矩阵为单位,prod(x)就是把x向量中所有元素乘积的结果.

4.mle()

最大似然估计

[phat,pci] = mle(data,'lognormal')

data 是这一组数据,'lognormal'的意思是对数正态分布,phat 为参数, pci是一个上界和一个下界,是phat的95%的置信区间

4.求偏导

syms x t; 声明变量用syms函数

z = sin(x*t^2)

ddt = diff(z, t) % 对t偏导

ddx = diff(z, x) % 对x偏导

5 .路径的存放

matlab中,函数的定义与实现应该放到单独的m文件中。

6.调用fminsearch (Nelder-Mead 单纯形法)

fun = @Lofafonlybc;

X0 =[1,1];

X = fminsearch(fun,X0)

注:fminsearch求的是最小值,如果要求极大似然函数要在前面添负号

7.二重积分的matlab书写

int(int(f(x),x,a1,a2),y,b1,b2)

注:f(x) 是被积函数,x y是被积变量,a1 a2 b1 b2 分别是其上下限

8.对矩阵的乘法,乘幂 均需加点

9.在一张图上画两条线

hold on

plot()

10.更改最大迭代次数

[...] = mvncdf(...,options) specifies control parameters for the numerical integration used to compute y. This argument can be created by a call to statset. Choices ofstatset parameters:

'TolFun' — Maximum absolute error tolerance. Default is 1e-8 when d < 4, or 1e-4 when d ≥ 4.

'MaxFunEvals' — Maximum number of integrand evaluations allowed when d ≥ 4. Default is 1e7. 'MaxFunEvals' is ignored when d < 4.

'Display' — Level of display output. Choices are 'off' (the default), 'iter', and 'final'. 'Display' is ignored when d < 4.

11.norminv()

正态函数求逆

norminv(0.0677)

12.两个矩阵串联

t12 = [t1, t2]

13. matlab 中的或

||

14.det()

determinant 求A的行列式

det(A)

15. 计时器

tic starts a stopwatch timer to measure performance. The function records the internal time at execution of the tic command. Display the elapsed time with the toc function.

16.strcmp()

判断两字符串是否相等

strcmp(s1,s2)

17.isfield()

判断结构体S是否含名为fieldname这个字段

isfield(S, 'fieldname')

18. log还是ln

matlab 中log()默认指的是以e为底的对数

我们通常所说的log是指以10为底的对数,而MATLAB中的log却不是这样。Matlab中的log函数在默认情况下是以e为底,即loge,如果需要计算以10为底的对数,那么需要用log10()函数

2 Mente carlo算例 2018年1月5日17:11:09

2.1 ransample()

Randsample 生成随机样本

语法:y = randsample(n,k,true)

1.生成样本的取值范围为1-n

2.生成k个样本

2.2 unique()

Unique values in array 一组向量中独一无二的值

语法:C = unique(A)

2.3 numel()

Number of array elements 一组向量中元素的个数

语法:n = numel(A)

2.4 abs()

Absolute value 绝对值

语法:Y = abs(X)

add:2018年1月24日11:09:38

更改矩阵的名称之后,需要重新保存覆盖原来的文件

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值