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:
how to choose 2nd element in the length of a combination

Subject: how to choose 2nd element in the length of a combination

From: sathish kumar

Date: 27 Dec, 2012 09:26:08

Message: 1 of 2

good afternoon
i have a combination of 1 2 3 4
l=length(comb) == 4;
now i have at step
for k=1:length(comb);
W= ((tk*u)/p)*pk;
my aim is i want to consider 2 3 4 elements .i dont want to consider 1st element
please tell me how to write the step as required above
i have written like this
 for k=1:length(comb)-1;
W= ((tk*u)/p)*pk;
is it write ?
please tell me

Subject: how to choose 2nd element in the length of a combination

From: Sadik

Date: 29 Dec, 2012 02:16:11

Message: 2 of 2

Hi Sathish,

I think you mean the following:

for k = 2:length(comb)
    ...
end

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