Assemble of column vector in column

FG=[];
FG=zeros(N,1);
m=5;
for n=1:1:ne %Calling elements
for i=1:1:6
d2=dof(n,m+i-1); %Calling degree of freedom for second node
force=eval(['force',num2str(n)]); %Calling elemental force vector
FG(d2,1)= FG(d2,1)+force(i,1); %calling element of the elemental force vector and adding to global force vector
end
end

6 comentarios

Chaudhary P Patel
Chaudhary P Patel el 11 de En. de 2021
i am getting FG only one column .
Mathieu NOE
Mathieu NOE el 11 de En. de 2021
hello
sure
your code is about a single column vector (second dim = 1 , in all your code)
FG=zeros(N,1);
FG(d2,1)= FG(d2,1)+force(i,1);
Chaudhary P Patel
Chaudhary P Patel el 11 de En. de 2021
Mathieu sir,
actually the FG is a Column vector and i want anther FG will filled in another column.
So tell me how can i do it.
Mathieu NOE
Mathieu NOE el 11 de En. de 2021
sorry
I don't understand what you intend to do ... can you somehow show on your code / describe what you are trying to do ?
Chaudhary P Patel
Chaudhary P Patel el 11 de En. de 2021
thank you sir for your help.
I got my mistake.
Mathieu NOE
Mathieu NOE el 12 de En. de 2021
ok - good luck for the future

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Centro de ayuda y File Exchange.

Preguntada:

el 11 de En. de 2021

Comentada:

el 12 de En. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by