Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

fir,fir if Number of all possible eigenvalues, 3D graph from 2D slices

Please login with a confirmed email address before reporting spam

Due to rf exampe about step index fiber.

1) how to script situation when number of eigenvalues is not known and i need to find all possible eigenvalues for different wavelengths.
I.e. SIF are single mode at certain wavelength, at other wavelengths more modes appear.
I need to find and to save possible eigenvalues at certain wavelengths.
I was able to find only first eigenvalue in *.mat file, but there is 1-36, depending on wavelength.

2)
the "if" in "for" do not work. The code below gives fatal error.

for ind=1:length(lambn),

for i=1:length(fem.sol.lambda),
if (i==1, neffs1(ind1)=real( fem.sol.lambda(1)*lambn(ind)*1e-3/(2*3.14), 0 );
if (i==1, ind1=ind1+1, 0 );
if (i==2, neffs2(ind2)=real( fem.sol.lambda(2)*lambn(ind)*1e-3/(2*3.14), 0 );
if (i==2, ind2=ind2+1, 0 );
end,

end,

If lines which contains "if" are commented, the script works.
I need to save all possible eigenvalues from each iteration.
ind1 and ind2 were initialized =1
ind comes from outer "for", looping through wavelengths

3) Is it possible to made 3D graph from 2D slices.


regards,
gintare

0 Replies Last Post Jul 14, 2009, 2:14 a.m. EDT
COMSOL Moderator

Hello gintare statkute

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.