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.

Error using colormap Too many input arguments.

Please login with a confirmed email address before reporting spam

Hey everybody, Does anyone of you know the following error when working with the Matlab live link:

mphplot(model,'pg1','rangenum',1);

Error using colormap
Too many input arguments.

Error in .../mli/mphplot.p>l_colorlegend (line 1384)

Error in .../mli/mphplot.p>addplot (line 300)

Error in .../mli/mphplot.p>mphplot (line 154)

? Any suggestions about how to fix it are MOST welcome.
Cheers, Sabine

1 Reply Last Post Jan 8, 2013, 12:17 p.m. EST

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 8, 2013, 12:17 p.m. EST
Hi again,
so after many hours of try-and-error, i know now that

mphplot(model,pg,'rangenum',1);
works NOT, anymore, if i use

"addpath(genpath('/users/me/myfolder'))"

which i used for analysis functions stored in that folder so i moved the functions to another folder, different to that my model.m is saved in, and everything works fine. (weirdly enough, for another model of mine, comsol has definitley no problem with the same command) Anyway, I am not sure if this is always the source of the error, since sometimes I ran the same model twice, and first it worked, then it didnt,...
I hope your errors behave nicer :)
Hi again, so after many hours of try-and-error, i know now that mphplot(model,pg,'rangenum',1); works NOT, anymore, if i use "addpath(genpath('/users/me/myfolder'))" which i used for analysis functions stored in that folder so i moved the functions to another folder, different to that my model.m is saved in, and everything works fine. (weirdly enough, for another model of mine, comsol has definitley no problem with the same command) Anyway, I am not sure if this is always the source of the error, since sometimes I ran the same model twice, and first it worked, then it didnt,... I hope your errors behave nicer :)

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.