Coupled ODE eigenvalue problem with Chebfun
11 views (last 30 days)
Show older comments
Hello Everyone.
I am trying to solve an eigenvalue problem with Chebfun but I getting an error. My code is attached below.
dom = [0,1];
opr = chebop(@(y,u,b,s) [-10*4^2*(1+y*0)^(-1.495)*5^2.*s./(50^2*0.001)...
+4^2*u+(1.495*0^2.*u./(1+y*0).^2)-(1.495^2*0^2*u./(1+y*0).^2)...
+1j*4^2*2*1.495*0*(1+y*0)^(-1.495)*50^2.*u./(4*2*50*0.001*(1+y*0))...
+4^2*(1+y*0).^(-2*1.495)*5^4.*u./(50^2*0.001^2)...
-2*1.495*0*diff(u,1)./(1+y*0)-1j*4^3*(1+y*0)^(-1.495)*5^2.*diff(u,1)/(4*2*50*0.001)...
+1j*4*2*(1+y*0)^(-1.495)*5^2.*diff(u,1)/(2*50*0.001)...
+1j*2*2*(1+y*0)^(-1.495)*5^2.*diff(u,1)/(2*50*0.001)-diff(u,2);...
0.001*b+1j*5*2*u+0.001*diff(b,2)/4^2;-u./(1+y*0)+...
1e-5*(-4^2.*s+1j*(1+1.495)*0.*s./(1+y*0)+diff(s,2))], dom);
oprlam = chebop(@(y,u,b,s) [(-1j*4^2*(1+y*0)^(-2*1.495)*5^4.*b/(5*2*50^2*0.001^2)...
-4^2*u/0.001);b;s], dom);
opr.bc = @(y,u,b,s) [u(0); b(0); s(0);u(1);b(1);s(1)];
[V, D] = eigs(opr, oprlam);
D = diag(D);
The error that I am getting is "Dimensions of matrices being concatenated are notconsistent". I am not sure how to get rid of the error. Please help me here. Thank you.
6 Comments
Torsten
on 11 Jul 2022
I don't know if CHEBFUN can handle complex-valued ODEs. You will have to look into the documentation or test with a simple example.
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!