For Programmers: Free Programming Magazines  


Home > Archive > Matlab > June 2007 > need help: error message with dendrogram.m









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author need help: error message with dendrogram.m
francesco picciolo

2007-06-11, 4:21 am

Hi all,
I'm working with dendrogram function.
The elements (leafs of the tree) are 5980, the dendrogram function,
but it
gives me an error.
Note that I set a new recusion limit with the command
set(0,'RecursionLimit',inf)

This is the error massages:

num(X, T, c, k, n,d); % trace back left subtree

Error in ==> dendrogram>clusternum at 350
T = clusternum(X, T, c, k, n,d); % trace back left subtree

Error in ==> dendrogram at 183
T = clusternum(Z,T,W(c),c,m-p+1,0); % assign to its leaves.

Can you help me?
Thanks
Francesco
Peter Perkins

2007-06-11, 7:13 pm

francesco picciolo wrote:
> Hi all,
> I'm working with dendrogram function.
> The elements (leafs of the tree) are 5980, the dendrogram function,
> but it
> gives me an error.
> Note that I set a new recusion limit with the command
> set(0,'RecursionLimit',inf)
>
> This is the error massages:
>
> num(X, T, c, k, n,d); % trace back left subtree
>
> Error in ==> dendrogram>clusternum at 350
> T = clusternum(X, T, c, k, n,d); % trace back left subtree
>
> Error in ==> dendrogram at 183
> T = clusternum(Z,T,W(c),c,m-p+1,0); % assign to its leaves.


Francesco, with that many data, it's quite possible that you'll either hit any
realistic recursion limit, or else if you've set that limit too high for your
machine, you will (as the recursion limit error message suggests) overflow your
stack and crash MATLAB.

If your goal in calling DENDROGRAM is to get the second output (the leaf
assignments), you might look at the CLUSTER function instead. But if your goal
is just to make a simple picture, here's what you can do: create a local copy
of DENDROGRAM and comment out the line that calls the (local) CLUSTERNUM
function to begin with. It looks like that's line 183 in the version you have.
You won't be able to use observation labels or colors, but it will make the
basic dendrogram.

As Tom noted earlier, we will look into implementing the DENDROGRAM function
without recursion.

By the way, although you've posted the stack trace of your error, you haven't
posted the error message itself. I'm just assuming that the error you're
(still) getting is a recursion limit error.

Hope this helps.

- Peter Perkins
The MathWorks, Inc.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com