pooled_ols: cover corner case

time-shift
Houtan Bastani 2017-12-07 16:49:11 +01:00
parent aa058bdcbc
commit 3c62bd63cf
1 changed files with 4 additions and 1 deletions

View File

@ -132,7 +132,10 @@ for i = 1:length(lhs)
];
[startidx, endidx] = regexp(rhs{i}, pregex, 'start', 'end');
assert(length(startidx) == 1);
if rhs{i}(startidx) == '*'
if rhs{i}(startidx) == '*' && rhs{i}(endidx) == '*'
vnames{j} = [getStrMoveLeft(rhs{i}(1:startidx-1)) '*' ...
getStrMoveRight(rhs{i}(endidx+1:end))];
elseif rhs{i}(startidx) == '*'
vnames{j} = getStrMoveLeft(rhs{i}(1:startidx-1));
elseif rhs{i}(endidx) == '*'
vnames{j} = getStrMoveRight(rhs{i}(endidx+1:end));