Info

This question is closed. Reopen it to edit or answer.

How can I construct a Matrix based upon each panel of a 2-D FEM beam

1 view (last 30 days)
The panel number is given by 'i'. This is related panel length 'c(i') which varies across the beam's span. 'n2' is the total number of panels
The task is to link each value of 'i' to the data that panel represents, there will be 200 values for each panel variable. The first variable is 'x1', it is based upon the shape of the panel. e.g. if i==1 then x1(1) will be the first 200 values of the linspace array if i==4 then x1(4) will be from 601-800 in the linspace array
At the moment I have a 'for' loop trying to do this, but I am unable to make it work. Below is the code so far;
i=1:n2;
c(i) = linspace(cr,ct,n2)';
%P is a constant integer
maxCd(i)= P*c(i);
x1=zeros(200,n2)
for n= ((i-1)*200+1):(i*200)
x1(n,i) = linspace(0,maxCd(i),200)
if i==1
n=1:200
if i==n2
break
end
end
end

Answers (0)

Community Treasure Hunt

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

Start Hunting!