Skip to content

AFNI/NIfTI Server

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

Doxygen Source Code Documentation


eq_str.m

Go to the documentation of this file.
00001 function ans = eq_str (s1,s2);
00002 %
00003 %               ans = eq_str (s1,s2);
00004 %
00005 %       returns 1 if strings are equal
00006 %          0 if they're not
00007 %
00008 %               Ziad Saad July 20 97
00009 
00010 ls1 = length (s1);
00011 ls2 = length (s2);
00012 
00013 if (ls1 ~= ls2),
00014         ans = 0;
00015         return;
00016 else
00017         ans = 1;
00018         for i=1:1:ls1,
00019                 if (s1(i) ~= s2(i)),
00020                         ans=0;
00021                 end;
00022         end;
00023         return;
00024 end;
00025 
 

Powered by Plone

This site conforms to the following standards: