% INVLAP � Numerical Inversion of Laplace Transforms
function [radt,ft]=INVLAP(Fs,tini,tend,nnt,a,ns,nd);
% Fs is formula for F(s) as a string
% tini, tend are limits of the solution interval
% nnt is total number of time instants
% a, ns, nd are parameters of the method
% if not given, the method uses implicit values a=6, ns=20, nd=19
% it is recommended to preserve a=6
% increasing ns and nd leads to lower error
% an example of function calling
% [t,ft]=INVLAP('s/(s^2+4*pi^2)',0,10,1001);
% to plot the graph of results write plot(t,ft), grid on, zoom on
FF=strrep(strrep(strrep(Fs,'*','.*'),'/','./'),'^','.^');
if nargin==4
a=6; ns=20; nd=19; end; % implicit parameters
radt=linspace(tini,tend,nnt); % time vector
if tini==0 radt=radt(2:1:nnt); end; % t=0 is not allowed
tic % measure the CPU time
for n=1:ns+1+nd % prepare necessary coefficients
alfa(n)=a+(n-1)*pi*j;
beta(n)=-exp(a)*(-1)^n;
end;
n=1:nd;
bdif=fliplr(cumsum(gamma(nd+1)./gamma(nd+2-n)./gamma(n)))./2^nd;
beta(ns+2:ns+1+nd)=beta(ns+2:ns+1+nd).*bdif;
beta(1)=beta(1)/2;
for kt=1:nnt % cycle for time t
tt=radt(kt);
s=alfa/tt; % complex frequency s
bt=beta/tt;
btF=bt.*eval(FF); % functional value F(s)
ft(kt)=sum(real(btF)); % original f(tt)
end;
toc
没有合适的资源?快使用搜索试试~ 我知道了~
caputo_caputo_拉普拉斯变换_nan_源码
共5个文件
m:5个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 160 浏览量
2021-10-02
01:58:40
上传
评论
收藏 2KB RAR 举报
温馨提示
用于计算拉普拉斯变换的离散形势,直接数值求解即可
资源推荐
资源详情
资源评论
收起资源包目录
caputo.rar (5个子文件)
fractionalPDF2.m 339B
fractionalPDF1.m 341B
INVLAP.m 1KB
fractionalPDF3.m 341B
fractionalPDF4.m 341B
共 5 条
- 1
资源评论
周玉坤举重
- 粉丝: 61
- 资源: 4782
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功