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:
Any computation time difference between 1 & 2?

Subject: Any computation time difference between 1 & 2?

From: Bruce Heu

Date: 19 May, 2011 01:48:03

Message: 1 of 3

Any computation time difference between 1 & 2?

1.
for i=1:N
a = a + 3;
c = c + 8;
end

2. SEPARATE THE SAME COMP. INTO TWO
for i=1:N
a = a + 3;
end

for i=1:N
c = c + 8;
end

Thanks....

Subject: Any computation time difference between 1 & 2?

From: dpb

Date: 19 May, 2011 01:51:43

Message: 2 of 3

On 5/18/2011 8:48 PM, Bruce Heu wrote:
> Any computation time difference between 1 & 2?
...
> Thanks....

Try it and see...

--

Subject: Any computation time difference between 1 & 2?

From: James Tursa

Date: 19 May, 2011 03:52:03

Message: 3 of 3

"Bruce Heu" wrote in message <ir1ssj$8lm$1@newscl01ah.mathworks.com>...
> Any computation time difference between 1 & 2?
>
> 1.
> for i=1:N
> a = a + 3;
> c = c + 8;
> end
>
> 2. SEPARATE THE SAME COMP. INTO TWO
> for i=1:N
> a = a + 3;
> end
>
> for i=1:N
> c = c + 8;
> end
>
> Thanks....

Yes.

James Tursa

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