Basic Loop Problem - Nodes in a system
2 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multidimensional Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!