function [p ic] = iter2param(pathIn)

curDir = pwd;

cd(pathIn)
files = dir('opt_iteration_*.mat');
for i = 1:length(files)
    load(files(i).name);
    p(:,i) = m.p;
    ic(:,i) = m.ic;
end
cd(curDir)