Could someone explain the absor code in matlab line by line ?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Walter Roberson
am 22 Mär. 2020
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.
Antworten (0)
Siehe auch
Kategorien
Mehr zu Title finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!