Not enough input arguments.
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I want to solve an equation with second derivatives of t and r and got These Problems.
"Not enough input arguments.
Error in PDE_lin_z>pde1DParams (line 70) c = DwDt*B/A;
Error in pdepe (line 246) [c,f,s] = feval(pde,xi(1),t(1),U,Ux,varargin{:});
Error in PDE_lin_z (line 20) sol = pdepe(m,@pde1DParams,@pde1DInitialCondition,@pde1DBoundaryCondition,r,t);"
% <a href="https://de.mathworks.com/help/matlab/ref/pdepe.html">PDEPE 1D Example on Mathworks</a>
m = 1;
r = linspace(0,1,50);
t = linspace(0,5,100);
sol = pdepe(m,@pde1DParams,@pde1DInitialCondition,@pde1DBoundaryCondition,r,t);
w = sol(:,:,1);
surf(r,t,w)
colorbar
title(['Numerical solution computed with ' num2str(length(r)) ' mesh points.'])
xlabel('Radius r')
ylabel('Time t')
function [c,f,s] = pde1DParams(r,t,w,DwDr,DwDt)
E = 70;
rho = 2.6989;
ny = 0.34;
A = (0.5-ny);
B = rho*(1-2*ny)*(1+ny)/E;
c = DwDt*B/A;
f = DwDr+1;
s = 0;
end
function [w0r,w0t] = pde1DInitialCondition(r,t)
w0r = sin(pi*r);
w0t = 0; % ?
end
function [pl, ql, pr, qr] = pde1DBoundaryCondition(rl, wl, rr, wr, t)
pl = wl;
ql = 0;
pr = pi * exp(-t); % z.B
qr = 1;
end
0 Commenti
Risposte (1)
Tony Mohan Varghese
il 11 Lug 2018
Please refer to the example for Partial Differential Equations. The pdefun and icFun in the PDEPE function signatures are in the form of:
[c,f,s] = pdefun(x,t,u,dudx)
u = icfun(x)
Vedere anche
Categorie
Scopri di più su General PDEs in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!