Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Matlab difficulties

Name: Anonymous 2010-02-28 6:49

Report in, Matlab fags!

Say I have a 365 x 24 matrix (days x hours), and I wish to make a 6 x 4 (4 hours x seasons) matrix containing the corresponding mean values. I can use mean(mean(A(1:90,0:3))) 24 times, adjusting the values, but this seemed a bit unnecessary. I came up with a loop structure, but this doesn't cover all days, because 365 isn't neatly divisible by 4. Also, I don't care to much for a loop structure, since Matlab works fastest with vectorized structures.

This is my loop code:

i = 1;
ii = 1;
j = 1;
jj = 1;
F = zeros(4,6);
while (i<273)
    while (j<17)
        F(ii,jj) = mean(mean(A(i:i+90,j:j+3)));
        j = j + 3;
        jj = jj + 1;
    end
    i = i + 90;
    ii = ii + 1;
    j = 1;
    jj = 1;
end


Any tips for a better way?

Name: Anonymous 2010-02-28 6:53


   ____ ∧ ∧   / ̄ ̄ ̄ ̄ ̄ ̄
 ~' ____(,,゚Д゚)< OMG MY ANUS WAS HAXED
   UU    U U    \______

      ∧ ∧  / ̄ ̄ ̄ ̄
    (,,゚Д゚)< HAX HAX
     ⊂  ⊃ \____
    ~|  |
      し`J

Name: Anonymous 2010-02-28 7:12

Report in, Matlab fags!
GTFO

Name: Anonymous 2010-02-28 7:20

Matlab is such a pain in the fucking ass.

How the hell can they make something so useful be so god damned annoying to use?

Name: Anonymous 2010-02-28 7:27

>>4
I know, right? Anyway: no-one knows how to neatly program this in Matlab?

Name: Anonymous 2010-02-28 7:50

SMASHING MY ANUS FOR FUN AND PROFIT

Name: Anonymous 2010-02-28 7:50

>>1-5
Samefags. GTFO and hax my anus!

Name: Anonymous 2010-02-28 7:50

>>1-5
Samefags. GTFO and hax my anus!

Name: Anonymous 2010-02-28 7:51

>>1-5
Samefags. GTFO and hax my anus!

Name: Anonymous 2010-02-28 7:51

>>1-5
Samefags. GTFO and hax my anus!

Name: Anonymous 2010-02-28 7:57

( ≖‿≖) Hax my anus

Name: Anonymous 2010-02-28 7:58

( ≖‿≖) Hax my anus

Name: Anonymous 2010-02-28 19:52




       ____ ∧ ∧   / ̄ ̄ ̄ ̄ ̄ ̄
     ~' ____(,,゚Д゚)< Don't mind me, just using proper tags.
       UU    U U    \______

          ∧ ∧  / ̄ ̄ ̄ ̄
        (,,゚Д゚)< I appreciate your effort, but it cannot be helped.
         ⊂  ⊃ \____
        ~|  |
          し`J

Name: Anonymous 2010-02-28 23:08


   ____ ∧ ∧   / ̄ ̄ ̄ ̄ ̄ ̄
~' ____(,,゚Д゚)< Don't mind me, just trying to align unicode.
  UU    U U    \______

         ∧ ∧  / ̄ ̄ ̄ ̄
        (,,゚Д゚)< I appreciate your effort, but it cannot be helped.
         ⊂  ⊃ \____
       ~|  |
         し`J

Name: Anonymous 2010-03-01 2:56

>>1,7-10
fags
Back to /b/,please!

Name: Anonymous 2010-03-01 15:54

>>13,14

仕方がない

Name: ​​​​​​​​​​ 2010-10-22 1:33

Name: Anonymous 2010-12-26 7:57

Name: Anonymous 2011-02-03 5:48

Don't change these.
Name: Email:
Entire Thread Thread List