Commit 8849dd2b authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Partial info/Octave compatibility fix: ismember() does not work with char arrays under Octave

parent d6c035aa
......@@ -29,7 +29,10 @@ function y=PCL_Part_info_irf( H, varobs, ivar, M_, dr, irfpers,ii)
% The jump variables have dimension NETA
[junk,OBS] = ismember(varobs,M_.endo_names,'rows');
OBS = [];
for i=1:rows(varobs)
OBS = [OBS find(strcmp(deblank(varobs(i,:)), cellstr(M_.endo_names))) ];
end
NOBS = length(OBS);
G1=dr.PI_ghx;
......
function AutoCOR_YRk=PCL_Part_info_irmoments( H, varobs, dr,ivar)
function AutoCOR_YRk=PCL_Part_info_moments( H, varobs, dr,ivar)
% sets up parameters and calls part-info kalman filter
% developed by G Perendia, July 2006 for implementation from notes by Prof. Joe Pearlman to
% suit partial information RE solution in accordance with, and based on, the
......@@ -31,7 +31,10 @@ function AutoCOR_YRk=PCL_Part_info_irmoments( H, varobs, dr,ivar)
warning_old_state = warning;
warning off
[junk,OBS] = ismember(varobs,M_.endo_names,'rows');
OBS = [];
for i=1:rows(varobs)
OBS = [OBS find(strcmp(deblank(varobs(i,:)), cellstr(M_.endo_names))) ];
end
NOBS = length(OBS);
G1=dr.PI_ghx;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment