# Thread Subject: Speeding up a matlab code

 Subject: Speeding up a matlab code From: Yong Hoon Date: 21 Jul, 2012 13:56:16 Message: 1 of 3 I have a problem of computing speed for this code. I appreciate if someone helps me to reduce the computing speed. % the size of K is usually (100000x100000). NT = 40401; NC = 43; %% Internal Nodes KII=[]; for i= 2*NC+1:2*NT for j= 2*NC+1:2*NT KII(i-2*NC,j-2*NC)=K(i,j); end end
 Subject: Speeding up a matlab code From: Bruno Luong Date: 21 Jul, 2012 15:03:09 Message: 2 of 3 "Yong Hoon " wrote in message ... > I have a problem of computing speed for this code. > I appreciate if someone helps me to reduce the computing speed. > > % the size of K is usually (100000x100000). > NT = 40401; > NC = 43; > %% Internal Nodes > KII=[]; > for i= 2*NC+1:2*NT > for j= 2*NC+1:2*NT > KII(i-2*NC,j-2*NC)=K(i,j); > end > end i= 2*NC+1:2*NT; j= 2*NC+1:2*NT; KII=K(i,j); % Bruno
 Subject: Speeding up a matlab code From: Yong Hoon Date: 22 Jul, 2012 21:24:15 Message: 3 of 3 "Bruno Luong" wrote in message ... > "Yong Hoon " wrote in message ... > > I have a problem of computing speed for this code. > > I appreciate if someone helps me to reduce the computing speed. > > > > % the size of K is usually (100000x100000). > > NT = 40401; > > NC = 43; > > %% Internal Nodes > > KII=[]; > > for i= 2*NC+1:2*NT > > for j= 2*NC+1:2*NT > > KII(i-2*NC,j-2*NC)=K(i,j); > > end > > end > > i= 2*NC+1:2*NT; > j= 2*NC+1:2*NT; > KII=K(i,j); > > % Bruno Thanks a lot!

Separated by commas
Ex.: root locus, bode

### What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.