|Anonymous | Login | Signup for a new account||2018-01-20 07:26 UTC|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000452||ODTBX - Matlab Code||public||2013-04-26 22:33||2014-03-07 18:37|
|Summary||0000452: Several Matlab utility functions now return column instead of row vectors.|
|Description||In Matlab R2013a (v8.1), several utility functions return column vectors where they used to return row vectors. This causes many errors within ODTBX functions that rely on these utilities returning row vectors.|
The affected Matlab utilities include: union(), intersect(), ismember(), and potentially others.
Each of the affected utilities now include an optional argument, 'legacy', that will revert the utility to the R2012b behavior. The use of 'legacy' must be investigated.
|Steps To Reproduce||Run any of the following regression tests:|
restartrecord_test (with or without 'SRIF' argument)
|Tags||No tags attached.|
The 'legacy' option will be added to function calls where needed. However, a long term solution should be found for the affected ODTBX functions.
For example, ominusc() contains the code:
ig = ;
for k = 1:m
which effectively gets a list of column indices for each column in dy that contains at least one number. This could potentially be replaced with:
ig = find(any(~isnan(dy)));
These types of code changes avoid expensive utilities such as union(). We should see where else in ODTBX we can use these types of code changes.
The 'legacy' option was added as needed to pass all regression tests.
See public repo commit 9d0bd5d.
|Fixed pending CCB approval.|
|Closed per CCB approval.|
The additional change to ominusc mentioned in http://odtbx.sourceforge.net/mantis/view.php?id=452#c3347 [^] appears to have been made at some point after this issue was closed. That change is not correct, because introducing "any" into the logic results in a single pass/fail outcome, rather than a list of indices of the valid measurements. The correct change should have been:
ig = find(~isnan(dy);
|There is another problem. I don't know how long Matlab has worked this way, but if you use a column vector as the value array for a for loop, it doesn't assign the index to each element of the array, as it it does for a row array. This is described in the Mathworks documentation. The for loop in ominusc just after the creation of the ig array has this problem since ig is a column array.|
ig = find(~isnan(dy);
doesn't work if dy is a matrix, so the originally intended change in 3347 should have been the one to get implemented (or something functionally equivalent if union is too slow).
|2013-04-26 22:33||ravidavi||New Issue|
|2013-04-26 22:33||ravidavi||Status||new => assigned|
|2013-04-26 22:33||ravidavi||Assigned To||=> ravidavi|
|2013-04-26 23:44||ravidavi||Note Added: 0003347|
|2013-04-29 20:23||ravidavi||Note Added: 0003348|
|2013-04-29 20:43||ravidavi||Steps to Reproduce Updated||View Revisions|
|2013-05-10 18:15||ravidavi||Note Added: 0003359|
|2013-05-10 18:15||ravidavi||Status||assigned => resolved|
|2013-05-10 18:15||ravidavi||Resolution||open => fixed|
|2013-05-13 14:05||ravidavi||Note Added: 0003365|
|2013-05-13 14:05||ravidavi||Status||resolved => closed|
|2014-03-07 18:06||carpente||Note Added: 0003407|
|2014-03-07 18:06||carpente||Status||closed => feedback|
|2014-03-07 18:06||carpente||Resolution||fixed => reopened|
|2014-03-07 18:25||carpente||Note Added: 0003408|
|2014-03-07 18:37||carpente||Note Added: 0003409|
|Copyright © 2000 - 2012 MantisBT Group|