From: us on 17 Mar 2010 06:56 "Andrew " <atb88(a)msn.com> wrote in message <hnqak4$bn8$1(a)fred.mathworks.com>... > "us " <us(a)neurol.unizh.ch> wrote in message <hnq9q1$so4$1(a)fred.mathworks.com>... > > "Andrew " > > > ...the third output argument is [M,F,C]=mode(x)...if the data is multimodal it just gives, for example, C=[2x1 double]... > > > > well... did you LOOK at the content of C(?)... > > > > us > Yes, but I don't see how this gives me the values of the modes. I see that it gives me how many modes there are,. no, this is not true - you obviously didn't look at it... you seem to waste CSSMers time carelessly - not boding well for your future in this NG... us
From: Tom Lane on 17 Mar 2010 09:42 >> > ...the third output argument is [M,F,C]=mode(x)...if the data is >> > multimodal it just gives, for example, C=[2x1 double]... >> >> well... did you LOOK at the content of C(?)... >> >> us > Yes, but I don't see how this gives me the values of the modes. I see that > it gives me how many modes there are,. Andrew, C is a cell array because different columns/rows of the input might have different numbers of modes. You're just looking at a display of the cell array. Here's how to look inside: >> [a,b,c] = mode([1 2 2 2 3;1 1 2 3 3],2) a = 2 1 b = 3 2 c = [ 2] [2x1 double] >> c{2} ans = 1 3 Row 1 has mode 2, and it appears 3 times. Row 2 has the value 1 provided as its mode in the first output, and it appears 2 times, but the final output shows that 1 and 3 both qualify as modes. -- Tom
From: Andrew on 19 Mar 2010 09:24 Apologies us, I'm not an experienced MATLAB user and all I wanted was a bit of help. Sorry if you think I was being ungrateful. Tom, thanks for that. I'm still not 100% sure of what I'm doing but I'll keep trying. Thanks again.
First
|
Prev
|
Pages: 1 2 Prev: hello Next: Can MATLAB warn you when you when you redefine existing functions? |