Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


isint.m

Go to the documentation of this file.
00001 function [res, int_part, dec_part] = isint (v)
00002 %
00003 %   [res, int_part, dec_part] = isint (v)
00004 %
00005 %Purpose:
00006 %   obvious
00007 %   
00008 %   
00009 %Input Parameters:
00010 %   
00011 %   
00012 %   
00013 %Output Parameters:
00014 %   res : 0 it's not an integer
00015 %       : 1 
00016 %   
00017 %   
00018 %      
00019 %Key Terms:
00020 %   
00021 %More Info :
00022 %   
00023 %   [res, int_part, dec_part] = isint (4.07)
00024 %   [res, int_part, dec_part] = isint (4.00)
00025 %   [res, int_part, dec_part] = isint (-4.07)
00026 %   [res, int_part, dec_part] = isint (-4.00)
00027 %
00028 %     Author : Ziad Saad
00029 %     Date : Wed Aug 11 16:42:55 CDT 1999 
00030 
00031 
00032 %Define the function name for easy referencing
00033 FuncName = 'isint';
00034 
00035 %Debug Flag
00036 DBG = 1;
00037 
00038 %initailize return variables
00039 fv = fix(v);
00040 df = v - fv;
00041 if (~df),
00042         res = 1;
00043         dec_part = 0;
00044         int_part = v;
00045 else
00046         res = 0;
00047         dec_part = df.*sign(v);
00048         int_part = fv.*sign(v);
00049 end
00050 
00051 
00052 
00053 
00054 
00055 err = 0;
00056 return;
00057 
 

Powered by Plone

This site conforms to the following standards: