Username Remember Me?
Password   forgot password?
   
   
Matlab-prtools conflict in boxplot function
Posted: 12 July 2009 01:03 PM   [ Ignore ]  
Newbie
Rank
Total Posts:  14
Joined  2009-07-02

Hi,
is this a known bug or did I do something wrong? Any workarounds?

>> x=rand(10,5)

=

    
0.9058    0.9706    0.0357    0.0318    0.3816
    0.1270    0.9572    0.8491    0.2769    0.7655
    0.9134    0.4854    0.9340    0.0462    0.7952
    0.6324    0.8003    0.6787    0.0971    0.1869
    0.0975    0.1419    0.7577    0.8235    0.4898
    0.2785    0.4218    0.7431    0.6948    0.4456
    0.5469    0.9157    0.3922    0.3171    0.6463
    0.9575    0.7922    0.6555    0.9502    0.7094
    0.9649    0.9595    0.1712    0.0344    0.7547
    0.1576    0.6557    0.7060    0.4387    0.2760

>> boxplot(x)
??? 
Adding new fields to an object is not permitted.

Error in ==> C:\Program Files\MATLAB\R2009a\toolbox\prtools\@dataset\subsasgn.p>subsasgn at 22


Error in 
==> boxplot>computeBoxLocation at 2039
        boxValDs
.(fn{i}) = boxValVect;

Error in ==> boxplot at 311
[boxVal
,boxValPlot,boxIdx] computeBoxLocation(xSorted,...

[ Edited: 26 July 2009 11:25 PM by idimou]
Profile
 
 
Posted: 12 July 2009 01:15 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  236
Joined  2008-04-26

Hi idimou,

it looks to me that PRTools dataset object masks a different dataset object (statistical toolbox?)
Try to remove PRTools from the Matlab path - your boxplot could be working.

Does it help?

Pavel

Profile
 
 
Posted: 12 July 2009 04:16 PM   [ Ignore ]   [ # 2 ]  
Newbie
Rank
Total Posts:  14
Joined  2009-07-02

I think I found a workaround (removing the path as you said, and readding it programatically)

rmpath('C:\Program Files\MATLAB\R2009a\toolbox\prtools');
clear classes;
boxplot(Errors);
addpath('C:\Program Files\MATLAB\R2009a\toolbox\prtools');

its not good practice, but it works.

Profile
 
 
Posted: 26 July 2009 11:25 PM   [ Ignore ]   [ # 3 ]  
Newbie
Rank
Total Posts:  14
Joined  2009-07-02

Of course my ad-hoc workaround clears the variables too, so you’d have to save them, then clear classes, then load the workspace again, and then call boxplot.

Perhaps a more neat solution might be appropriate by the development team, in the next release.

Profile