www.gusucode.com > pde 案例源码 matlab代码程序 > pde/ResultsFromAnEigenvalueProblemExample.m
%% Results from an Eigenvalue Problem % Obtain an |EigenResults| object from |solvepdeeig|. %% % Create the geometry for the L-shaped membrane. Apply zero Dirichlet % boundary conditions to all edges. model = createpde; geometryFromEdges(model,@lshapeg); applyBoundaryCondition(model,'dirichlet','Edge',1:model.Geometry.NumEdges,'u',0); %% % Specify coefficients |c = 1|, |a = 0|, and |d = 1|. specifyCoefficients(model,'m',0,'d',1,'c',1,'a',0,'f',0); %% % Create the mesh and solve the eigenvalue problem for eigenvalues from 0 % through 100. generateMesh(model,'Hmax',0.05); ev = [0,100]; results = solvepdeeig(model,ev) %% % Plot the solution for mode 10. pdeplot(model,'XYData',results.Eigenvectors(:,10))