Watch this Author's files

Another question: I want to solve the eigenvalues and eigenfunctions of the following equation

y''''(x)=lambda*f(x)*y(x)

Here f(x) is a function defined in a seperate .m file. Is it possible to use chebfun to solve the eigenvalues and eigenfunctions?

Thanks. Jeff

An excellent software!!! Definitely 5 star.

A quick question. I am using the chebfun function to find the eigenvalues and eigenfunctions of the following boundary value problem

D^4 y=lambda*y, y''(0)=y'''(0)=y''(1)=y'''(1)=0,

where D is the differential operator, lambda is the eigenvalue and the solution y is the corresponding eigenfunction.

I used the following code in chebfun:

L = chebop(@(x,u) diff(u,4), [0,1]); L.lbc = @(u) diff(u,2); L.lbc =@(u) diff(u,3); L.rbc = @(u) diff(u,2); L.rbc =@(u) diff(u,3); [V,D] = eigs(L,trunc); disp(diag(D)), toc

HOWEVER, the below error was reported

Error using eig Matrix must be square.

Error in linop/eigs>bc_eig (line 288) [V,D] = eig(full(Amat),full(Pmat));

Error in linop/eigs (line 94) [V1,D1] = bc_eig(A,B,33,33,0,map,breaks);

Error in chebop/eigs (line 57) [varargout{1:nargout}] = eigs(L,varargin{:});

Looks like I am on the right track but some nonsquare matrix caused that error. Sincerely appreciate your comments and suggestions.

Contact us