How to set a vector as initial condition for PDEs?
Mostrar comentarios más antiguos
I'm trying to set a vector, Cini, containing a spatially-varying quantity as my intial codition in a pde for all except the first instance of a loop (in this instance, initial condition is uniform for r<=R1). In the current wrong syntax (below), it's tripping the code up. How do I go about correctly implementing this?
function c0 = pdex2ic(r)
if r <= R1
if i==1
c0 = C0;
else
c0 = Cini;
end
else
c0 = 0;
end
end
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Eigenvalue Problems en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!