Clear Filters
Clear Filters

Ask for a code

2 views (last 30 days)
Tran Hoa
Tran Hoa on 29 Mar 2018
Commented: Walter Roberson on 29 Mar 2018
Please explain for me this code
function [L,I]=selectdof(DOF,seldof,varargin)
%SELECTDOF Select degrees of freedom.
% % L=selectdof(DOF,seldof)
% [L,I]=selectdof(DOF,seldof)
% L=selectdof(DOF,seldof,'Ordering',ordering)
% creates the matrix to extract degrees of freedom from the global degrees of
% freedom by matrix multiplication. %
% DOF Degrees of freedom (nDOF * 1)
% seldof Selected DOF labels (kDOF * 1)
% L Selection matrix (kDOF * nDOF)
% I Index vector (kDOF * 1)
% ordering 'seldof','DOF' or 'sorted' Default: 'seldof'
% Ordering of L and I similar as seldof, DOF or sorted
I have 5 nodes with coordinates
% Nodes=[NodID X Y Z]
Nodes= [1 0 0 0;
2 0 4 0;
3 0 4 0;
4 4 4 0;
5 4 0 0;
6 1 5 0];
why seldof at nodes 1 and 5 is
seldof=[0.03; 0.04; 0.05; 1.00; 5.01; 5.02];
What seldof mean ?
  4 Comments
Adam
Adam on 29 Mar 2018
It's very difficult for someone to just explain an arbitrary function from somewhere else that doesn't include any validation of inputs or comments as to what they are supposed to be.
Your first port of call should be asking the person you got the code from. We don't know if the code even works so spending time trying to understand what it is doing is not worth it without more information.
Walter Roberson
Walter Roberson on 29 Mar 2018
The above was the only record I could find of the toolbox, with the exception that I see the paper listed on the publication list at that university.

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!