Commit d56ae08c authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Changed behaviour of @dseries/pop method. If only one argument is provided,...

Changed behaviour of @dseries/pop method. If only one argument is provided, remove the last variable.
parent 0d972525
......@@ -45,11 +45,18 @@ function [ts,id] = pop(ts,a) % --*-- Unitary tests --*--
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
id = find(strcmp(a,ts.name));
if nargin<2
% Removes the last variable
id = ts.vobs;
else
id = find(strcmp(a,ts.name));
end
if isempty(id)
id = 0;
return
end
ts.vobs = ts.vobs-1;
ts.data(:,id) = [];
ts.name(id) = [];
......
Markdown is supported
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