Closed gabrielenava closed 9 years ago
what do you mean with "automatically display"? If I type "help Rf" I can already see the documentation. if you mean adding an explanation of the function's structure and not only its description I can do it once for all the mex_wholebodymodel_balancing functions, but I need some more time
@gabrielenava ah, apparently then matlab is able to deal with slightly malformed docstrings... however I thinks it is better to comply with matlab guidelines with consistency and readability, the same that you get when you create a new matlab function:
function [ output_args ] = untitled( input_args )
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
end
In this case this would be:
function R = Rf(u)
%RF Summary of this function goes here
% Detailed explanation goes here
end
@gabrielenava no need to redo all the documentation for all the functions in the repo... let's just start by what we can improve immediately .
so the wrong part of the description is "from a given quaternion", because it has been already converted before and what is passed to the function is just scalar+vector, am I right?
I don't really understand what is wrong, to write the description I went on this page https://en.wikipedia.org/wiki/Euler%E2%80%93Rodrigues_formula I verify that it's the same formula used in Rf.m than I added a small description based on what is written on this page
@gabrielenava Euler-Rogrigues formula is different from Rodrigues Formula . The first is mapping euler parameters (that are in coordinates identical to quaternions) to rotation matrices, while the second is mapping a rotation expressed in axis angle to rotation matrices.
:+1:
I understand and I definitely eliminate the term "Rodriguez formula" to avoid ambiguity
Hallelujah!
:+1:
modified conversion from quaternions to rotation matrix in Rf.m