specify coefficients in pdeeig

1 view (last 30 days)
Haya M
Haya M on 9 Oct 2019
I'm working on finding the eigenvalues of a PDE, I'm using: [v,l] = pdeeig(b,p,e,t,1.0,'c*exp(-x)',1.0,[-5 0.9]); the sixth entry related to the potential ? given in the formula of the pde in the Eigenmode.. I would like to add a loop to this code to plot some certain eigenvalues for specific values of the constant c in the pde..
my attempt is
>
for ?=0.1:0.2:1c=0.1:0.2:1
.
.
[v,l] = pdeeig(b,p,e,t,1.0,'c*exp(-x)',1.0,[-5 0.9]);
plot(real(l),c,'*')
hold on
end
'''
the code works when I enter the value of ? manually and without the loop e.g., [v,l] = pdeeig(b,p,e,t,1.0,'0.5*exp(-x)',1.0,[-5 0.9]); but it says there is an error when I treat ? as a symbol with different values in a loop as I mentioned in the code.. Is there any idea how I can fix this .. appreciate any help..

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!