Mercurial > hg > ltpda
diff m-toolbox/sltpda/sltpda_getvar.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m-toolbox/sltpda/sltpda_getvar.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,14 @@ +function varout = sltpda_getvar(block, var) +% SLTPDA_GETVAR gets a mask value from a block. If the value can be +% numeric, it is returned as numeric, otherwise, it is left as a string. +% +% usage: varout = sltpda_getvar(block, 'var'); +% +% M Hewitson 04-05-07 +% +% $Id: sltpda_getvar.m,v 1.1 2007/05/06 12:17:38 hewitson Exp $ + +varout = get(block, var); +if ~isempty(str2num(varout)) + varout = str2num(varout); +end