Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/symfony/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
matlab中调用ilaplace函数的奇怪错误_Matlab - Fatal编程技术网

matlab中调用ilaplace函数的奇怪错误

matlab中调用ilaplace函数的奇怪错误,matlab,Matlab,我在matlab中使用ilaplace变换来计算函数的拉普拉斯逆变换,但是,我遇到了一个无法处理的奇怪错误。这是matlab命令行的输出,其中>是提示。(s和t是syms符号变量) 问题是,如果我直接调用ilaplace(N),我会出错。但是,如果我将表达式传递给ilaplace,我就得到了正确的答案。我不知道为什么 编辑:完整的代码文件如下所示 syms s t; syms s positive; syms t positive; tau = 4.256231304574323742984

我在matlab中使用
ilaplace
变换来计算函数的拉普拉斯逆变换,但是,我遇到了一个无法处理的奇怪错误。这是matlab命令行的输出,其中
>
是提示。(
s
t
syms
符号变量)

问题是,如果我直接调用
ilaplace(N)
,我会出错。但是,如果我将表达式传递给
ilaplace
,我就得到了正确的答案。我不知道为什么

编辑:完整的代码文件如下所示

syms s  t;
syms s positive;
syms t positive;

tau = 4.2562313045743237429846099474892;

V_fitted = 1 - 1.015*exp(-0.0825*t);  % CDF function
V_fitted_right_shift = subs(V_fitted, t, t - tau);  % right shift CDF by tau

lambda_out = 1 / ( tau + int((1 - V_fitted_right_shift), [tau, Inf]) );  %arrival rate of the process

K = 4;  %number of processes

V_CDF_superposed = 1 - (1 - V_fitted_right_shift)*(lambda_out * int((1-V_fitted_right_shift), [t-tau, Inf]))^(K - 1); %new CDF 

FV_CDF_superposed = vpa(V_CDF_superposed);

Laplace_V_CDF_superposed = laplace(FV_CDF_superposed);  %laplace transform

N = Laplace_V_CDF_superposed/(1 - s * Laplace_V_CDF_superposed);    

N = vpa(N);  
N = simplify(N);

N_t = ilaplace(N);

我无法重现该问题,您是如何创建/获取
N
?你能把代码也给我吗?@Daniel我想绕道这个错误,所以我修改了代码,在我把它改回来后,错误就消失了!这太奇怪了@丹尼尔哦,等等~@Daniel问题的底部添加了完整的代码。请你看看这个好吗?
syms s  t;
syms s positive;
syms t positive;

tau = 4.2562313045743237429846099474892;

V_fitted = 1 - 1.015*exp(-0.0825*t);  % CDF function
V_fitted_right_shift = subs(V_fitted, t, t - tau);  % right shift CDF by tau

lambda_out = 1 / ( tau + int((1 - V_fitted_right_shift), [tau, Inf]) );  %arrival rate of the process

K = 4;  %number of processes

V_CDF_superposed = 1 - (1 - V_fitted_right_shift)*(lambda_out * int((1-V_fitted_right_shift), [t-tau, Inf]))^(K - 1); %new CDF 

FV_CDF_superposed = vpa(V_CDF_superposed);

Laplace_V_CDF_superposed = laplace(FV_CDF_superposed);  %laplace transform

N = Laplace_V_CDF_superposed/(1 - s * Laplace_V_CDF_superposed);    

N = vpa(N);  
N = simplify(N);

N_t = ilaplace(N);