gusl: (Default)
[personal profile] gusl
To implement a cross-validation function, I want to partition my set of data points.
Since the number may not divide evenly, I can't simply turn the vector into a matrix.
Strangely enough, it seems I never needed lists in Matlab before.

(no subject)

Date: 2008-12-02 03:28 am (UTC)
From: [identity profile] zarex.livejournal.com
Using cells is my usual workaround.

(no subject)

Date: 2008-12-02 05:25 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
Thanks!

Would you know of a shorter way to write:
[sum(mses{1}),sum(mses{2}),sum(mses{3}),sum(mses{4}),sum(mses{5})]
? (Note the curly brackets!)

(no subject)

Date: 2008-12-02 05:32 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
Ok. I can turn into a matrix using cell2mat (but into because the have the same size!).

But even then, the only ways I know of finding the column sums of a matrix seem kinda awkward.

(no subject)

Date: 2008-12-02 05:39 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
here's a way: sum(cell2mat(mses')')


February 2020

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags