Home > database > ensemble_remove_vars_from_datastruct.m

ensemble_remove_vars_from_datastruct

PURPOSE ^

Removes variables specified in vars2remove cell array of strings from the

SYNOPSIS ^

function data_st = ensemble_remove_vars_from_datastruct(data_st, vars2remove)

DESCRIPTION ^

 Removes variables specified in vars2remove cell array of strings from the
 Ensemble datastruct data_st

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function data_st = ensemble_remove_vars_from_datastruct(data_st, vars2remove)
0002 % Removes variables specified in vars2remove cell array of strings from the
0003 % Ensemble datastruct data_st
0004 
0005 % 08Nov2011 Petr Janata
0006 
0007 rmMask = ismember(data_st.vars, vars2remove);
0008 
0009 data_st.vars(rmMask) = [];
0010 data_st.data(rmMask) = [];
0011 
0012 return

Generated on Wed 20-Sep-2023 04:00:50 by m2html © 2003