From ab19ebd6719f9c68dc33cef7232ebc19d72c8e6e Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Wed, 15 Jan 2020 17:05:45 +0100 Subject: [PATCH] Updated documentation --- TODO.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/TODO.md b/TODO.md index 795b825..5b3568c 100644 --- a/TODO.md +++ b/TODO.md @@ -23,7 +23,15 @@ The list below contains non-essential but nice-to-have tasks for the next stable # Known pitfalls -The following behavioral differences have been detected between the Matlab functions and their R counterparts. In order to save time, these differences will not be addressed, since they could require extensive reworking of a function. However, such differences may very well cause unexpected problems in some situations, which is why compiling this list is so important. The list below might provide a good starting point for identifying and fixing bugs: +The following behavioral differences have been detected between the Matlab functions and their R counterparts. In order to save time, these differences will not be addressed, since they could require extensive reworking of a function. However, such differences may very well cause unexpected problems in some situations, which is why compiling this list is so important. The tables below might provide a good starting point for identifying and fixing bugs. + +As general remarks, one should keep in mind that: + +- For compliance with IEC 60559, the `round` in base R rounds .5 to the nearest even integer, whereas the homonym function in Matlab rounds up (or down, if negative). +- Some clobal variables have been added as a new (last) argument to the function they appear in. +- When a function is defined on Matlab with multiple outputs, as in `[y1, y2] = f(x)`, it will output only `y1` if called without assignment, as in `f(3)`, or if called with a one-length assignment, as in `a = f(3)`. In order to receive the full output, one must assign two variables to the left side of the assignment operator, as in `[a, b] = f(3)`. rBAPS Functions that might be affected by this behavior include `etsiParas`. + +## Functional differences in rBAPS functions | Function | Argument | Value | Matlab output | R output | | ----------------- | ------------------ | -------------- | --------------------- | ------------------------------- | @@ -31,7 +39,8 @@ The following behavioral differences have been detected between the Matlab funct | `ownNum2Str` | `number` | `` | `''` | `''` + warning | | `repmat` | `length(n)` | `> 2` | > 2D matrix | 2D matrix | -As general remarks, one should keep in mind that: +## Functional differences in base Matlab functions -- For compliance with IEC 60559, the `round` in base R rounds .5 to the nearest even integer, whereas the homonym function in Matlab rounds up (or down, if negative). -- Some clobal variables have been added as a new (last) argument to the function they appear in. \ No newline at end of file +Function | Matlab output | R output +-------- | ------------- | -------- +`max` | Can handle complex numbers | Cannot handle complex numbers \ No newline at end of file