Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
speedup code

Subject: speedup code

From: andrea182

Date: 9 Dec, 2009 16:22:33

Message: 1 of 2

can someone tell me how can i speed up this code:

lungo=5000;
for(t=lungo:-1:1)
   tsc(1,t)=(t-1)*(-60)
end

i can't change lungo...

it takes about 2-3 minutes...

the code is right but it is so slow....

thanks

Subject: speedup code

From: Sadik

Date: 10 Dec, 2009 11:02:16

Message: 2 of 2

How about this one?

t = lungo:-1:1;
tsc(1,:) = -60*(t-1);

Best.

Tags for this Thread

No tags are associated with this thread.

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.

Contact us