Changed logic in isfreq routine.

time-shift
Stéphane Adjemian (Charybdis) 2014-06-13 16:32:25 +02:00
parent e41e8effdf
commit 558c818cca
1 changed files with 12 additions and 1 deletions

View File

@ -25,4 +25,15 @@ function B = isfreq(A)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
B = (ischar(A) && ismember(upper(A),{'Y','A','Q','M','W'})) || ismember(A,[1 4 12 52]);
B = 0;
if ischar(A)
if isequal(length(A),1) && ismember(upper(A),{'Y','A','Q','M','W'})
B = 1;
return
end
end
if isnumeric(A) && isequal(length(A),1) && ismember(A,[1 4 12 52])
B = 1;
end