Error in using MNPBEM toolbox

조회 수: 2 (최근 30일)
caicai
caicai 2016년 3월 23일
댓글: Walter Roberson 2020년 2월 7일
When I am using MNPBEM toolbox by UNI GRAZ, and running the samples, errors always come as "Too many outputs requested. Most likely cause is missing [] around left hand side that has a comma separated list expansion." Is there anyone who can help? Thanks!
  댓글 수: 3
Nurjannah AM
Nurjannah AM 2020년 2월 7일
Same as me too,
Index exceeds matrix dimensions.
Error in compound/dielectric>@(eps)(eps(enei)) (line 13)
eps = cellfun( @( eps ) ( eps( enei ) ), obj.eps, 'UniformOutput', false );
Error in compound/dielectric (line 13)
eps = cellfun( @( eps ) ( eps( enei ) ), obj.eps, 'UniformOutput', false );
Error in compound/subsref (line 36)
varargout{ 1 } = expand( obj, dielectric( obj, s( 2 ).subs{ 1 }, 1 ) );
Error in comparticle/subsref (line 18)
[ varargout{ 1 : nargout } ] = subsref@compound( obj, s );
Error in bemstat/subsref (line 31)
eps1 = obj.p.eps1( enei );
Error in \ (line 12)
obj = subsref( obj, substruct( '()', { exc.enei } ) );
Error in Demo6 (line 38)
sig = bem \ exc(p, enei);
>>
Walter Roberson
Walter Roberson 2020년 2월 7일
Whatever enei is, the object exc is not as large as that in some respect.
This is not related to the original question about too many output arguments.

댓글을 달려면 로그인하십시오.

채택된 답변

Biel Roig Solvas
Biel Roig Solvas 2016년 10월 25일
Hi,
I had the same problem, for me it was related to the function subclasses found in /MNPBEM14/Misc/+misc/subclasses.m In order to find the subclasses more efficiently, it only searches on folders with the name MNPBEM. If you don't add the MNPBEM folder in the path, but only its contents (that's what I did), it won't find any MNPBEM-named folder and it will subclasses will return an empty struct, creating the error you mention.
Just add the whole folder to the path and it should be solved (not only what's inside, but the folder itself too).
Best,

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by