help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Vector approach to row margin frequencies


From: ws
Subject: Re: Vector approach to row margin frequencies
Date: Tue, 23 Jun 2009 23:36:03 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

> I would love to now get the row frequencies avoiding a while loop, something 
> like F=X./S, but that doesn't work (though it seems somehow consistent -- I 
> realize that we don't recycle vectors in Octave/ Mat* ) ....

Feeling a little silly, here is an answer to my question:

rowMargins =  bar ./ repmat(sum(bar,2),[1 columns(bar)])
colMargins =  bar ./ repmat(sum(bar,1),[rows(bar) 1])

Duh, sorry about the noise, hopefully some poor fool will be helped by this....



reply via email to

[Prev in Thread] Current Thread [Next in Thread]