Basic Loop Problem - Nodes in a system

7 Ansichten (letzte 30 Tage)
Jack
Jack am 26 Feb. 2015
Bearbeitet: Star Strider am 26 Feb. 2015
Hi,
Here is my code:
freedof=[Bl,BR,TL,TR];
for i=Bl+1:BR-1;
freedof=[3*i-2 3i-1 3i];
end
for i = BR+1:1:TL-1
end
for i=TL+1:1:TR-1
end
where Bl,BR,TL,TR are previously defined as simple positive numbers. I am trying to create a matrix, for example if Bl = 1 BR = 2 TL = 3 TR = 4 the I need to return a matrix of [1 2 3 4 5 6 7 8 9 10 11 12] i.e 3i-2 3i-1 3i for each defined input (BL etc).
Any help would be much appreciated :) Thanks.

Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by