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

时间:2015-01-25 07:27:06

标签: matlab

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

>> N

N =

-(2.7071747341794232778783099808678e-34*(3.5938879023008902403763863659998e33*s - 68267793397927900578281423804583.0))/s^2

>> ilaplace(N)
Error using mupadmex
Error in MuPAD command: The argument is invalid. [_concat]
  Evaluating: partfrac

Error in transform (line 74)
F = mupadmex('symobj::vectorizeSpecfunc', f.s, x.s, w.s, trans_func,
'infinity');

Error in sym/ilaplace (line 31)
F = transform('ilaplace', 's', 't', 'x', L, varargin{:});

>> ilaplace(-(2.7071747341794232778783099808678e-34*(3.5938879023008902403763863659998e33*s - 68267793397927900578281423804583.0))/s^2)

ans =

(23990078920530555628928726307903*t)/1298074214633706907132624082305024 - 4933332333844707562298796153537/5070602400912917605986812821504

问题是,如果我直接调用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);

0 个答案:

没有答案