Username Remember Me?
Password   forgot password?
   
   
Error using parzenc with Matlab 2009a
Posted: 02 June 2009 12:22 PM   [ Ignore ]  
Newbie
Rank
Total Posts:  8
Joined  2009-06-02

Hi,

When using parzenc in Matlab 2009a ( 7.8.0.347 ). I get the following error:

??? Undefined function or method ‘bsxfun’ for input arguments of type ‘dataset’.

Error in ==> var at 85
x = bsxfun(@minus, x, xbar);

Error in ==> std at 32
y = sqrt(var(varargin{:}));

Error in ==> parzenc at 94
h = max(std(a)); % for sure a too high value

In Matlab 2007 my code works fine. Does anybody know how to resolve this ?

Thank in advance and with regards,

Rob

Profile
 
 
Posted: 02 June 2009 07:55 PM   [ Ignore ]   [ # 1 ]  
Moderator
RankRankRankRank
Total Posts:  250
Joined  2008-11-08

Hi Rob,

std() has been overloaded for the prtools dataset type. I don’t see it happening in your error messages. So I am afraid that either prtools is not found or another dataset is active. Try ‘which dataset’. Change your path and put prtools on top if necessary.

Best regards,

Bob Duin

Profile
 
 
Posted: 02 June 2009 08:27 PM   [ Ignore ]   [ # 2 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  236
Joined  2008-04-26

Hi Rob,

I tested parzenc under 2009a (the same build as you have) and I don’t see any problem:

>> a=gendatb
Banana Set
100 by 2 dataset with 2 classes[50  50]
>> w=parzenc(a)
Parzen Classifier2 to 2 trained  mapping   --> parzen_map

>> [v1,v2,v3]=prversion

v1 
=

    
4.1040


v2 
=

4.1.4


v3 
=

28-Apr-2009_17:42

>> which dataset
/Users/pavel/Desktop/prtools_com/prtools/@dataset/dataset.p  dataset constructor

It could be the statistical toolbox on your path?

Best Regards,

Pavel

Profile
 
 
Posted: 03 June 2009 07:55 AM   [ Ignore ]   [ # 3 ]  
Newbie
Rank
Total Posts:  8
Joined  2009-06-02

Hi Bob, Pavel,

Thank you for your answers. The dataset type is ok. If I run Pavel’s code I get the mentioned error. The reported prtools version is 4.0010, 4.0.14, 05-Mar-2005 so I probably need an upgrade.

Greetings,

Rob

Update: I downloaded and installed 4.1.4 version and the problem has disappeared. Thanks.

[ Edited: 03 June 2009 08:25 AM by Rob Ottenhoff]
Profile