Could someone explain the absor code in matlab line by line ?

Hi All
I was reading the absor code in matlab, but it seems to be too complicated, even reading the relevant quaternions theory, seems to be too sophisticated. could someone help me to understand the code by explaining it kindly ?

3 Comments

Well, in theory the author of the code could explain it line-by-line. However, I would not expect him to do so.
Explaining code that long line-by-line with reference to relevant theory and explaining the theory to make it comprehendable, is something that takes hours. As in hundreds of hours. As in typically requires that the person doing the explanation write three or perhaps four textbooks.
It would be much much faster if you were to ask specific questions about what you do not understand, so that the volunteers do not have to assume that you have never seen a computer before. (You gave no indication about what it is you do not understand, so the person doing the explanation would have to assume you know nothing at all about mathematics or physics or computer programming or programming in MATLAB.)
Thank you dear Walter ! well I know about mathematics and physics. I think the complexity comes from the complexity of the theory and some functions in the code that I don't usually use.
just to start : what is the Input option processing and set up block doing exactly ?
these lines do not have an explanation
That section of code is looping through any name/value pairs that are provided. It is looking for the option names doScale doTrans weights the purpose of which is explained in the comments:
%with parameter/value pair options,
%
% 'doScale' - Boolean flag. If TRUE, the global scale factor, s, is included.
% Otherwise, it is assumed that s=1. Default=FALSE.
%
% 'doTrans' - Boolean flag. If TRUE, the translation, t, is included. Otherwise,
% zero translation is assumed. Default=TRUE.
%
% 'weights' - The length N-vector of weights, w. Default, no weighting
It is using strcmp() against hard-coded strings because the code was designed before string() datatype was added to MATLAB, and strcmp() is the way to compare two character vectors. When it finds a character vector it recognizes, it takes the next parameter in the list as being the value to associate with the parameter, and the variables stored into are all hard-coded.
Standard option processing.

Sign in to comment.

Answers (0)

Tags

Asked:

on 21 Mar 2020

Commented:

on 22 Mar 2020

Community Treasure Hunt

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

Start Hunting!