Skip to content

AFNI/NIfTI Server

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

Doxygen Source Code Documentation


PurgeComments.m File Reference

Go to the source code of this file.


Functions

 if (nargin==1)
skip the help lines (top comments) if there are any if(C(1)
 if (~isempty(Loc_1))
 fprintf ('C purged of heading is:\n')
 fprintf ('%c', C)
 CnoCom (1:length(FirstChunk))
 fprintf ('CnoCom at first chunk:\n')
 fprintf ('%c', CnoCom(1:nCnoCom))
 while (cnt< length(Loc_1))
make sure next line is not
a comment 
if (cend+1==Loc_1(cnt+1))
end while (lop)
end looks like it is a cycle
through block 
fprintf (1,'Looping, cnt=%g/%g\n', cnt, length(Loc_1))
 if (cnt< length(Loc_1)) if(cend+1
 CnoCom (1+nCnoCom:nCnoCom+length(GoodChunk))
 fprintf ('CnoCom at middle chunk(cnt=%g):\n', cnt)
 CnoCom (1+nCnoCom:nCnoCom+length(LastChunk))
 fprintf ('Last Chunk:\n')
 fprintf ('%c', LastChunk)
 fprintf ('\n ***\nFinal CnoCom\n ***\n')

Variables

 function [CnoCom]
default is Output Parameters
 ch = '%'
end Debug Flag DBG = 1
initailize return variables err = 1
 CnoCom = []
 Com = ''
 end [err, Loc_1] = FindChar (C, ch)
 cnt = 1
 nC = length(C)
 FirstChunk = C(1:Loc_1(1)-1)
 nCnoCom = length(FirstChunk)
skip that line [err, Cnext, cend] = NextString (C, 'NewLine', Loc_1(cnt))
make sure next line is not
a comment 
lop = 1
end looks like it iscomment
end end end copy the next good piece
end end end copy the next
good if you did not run out
of cnt in the looping condition
above 
GoodChunk = C(cend+1:Loc_1(cnt+1)-1)
end end append last piece
if any 
LastChunk = NextString (C, 'NewLine', Loc_1(cnt)) C(cend+1:nC)
end return

Function Documentation

CnoCom 1+nCnoCom:nCnoCom+  length(LastChunk)  ) 
 

CnoCom 1+nCnoCom:nCnoCom+  length(GoodChunk)  ) 
 

CnoCom 1:  length(FirstChunk)  ) 
 

fprintf '\n ***\nFinal CnoCom\n ***\n  ) 
 

fprintf '%c'  ,
LastChunk 
 

fprintf 'Last Chunk:\n  ) 
 

fprintf 'CnoCom at middle chunk(cnt=%g):\n ,
cnt 
 

end looks like it is a cycle through block fprintf ,
Looping,
cnt  = %g/%g\n',
cnt  ,
length(Loc_1) 
 

fprintf '%c'  ,
CnoCom(1:nCnoCom
 

fprintf 'CnoCom at first chunk:\n  ) 
 

fprintf '%c'  ,
 

fprintf 'C purged of heading is:\n  ) 
 

if  ) 
 

make sure next line is not a comment if cend 1 = = Loc_1(cnt+1)  ) 
 

if isempty(Loc_1)  ) 
 

if nargin  = = 1  ) 
 

skip the help lines top  comments  ) 
 

end while lop   ) 
 

while  ) 
 


Variable Documentation

ch = '%'
 

Definition at line 37 of file PurgeComments.m.

Referenced by blanktrim(), check_disk_space(), e_rsle(), find_string(), FTOSH_getopts(), getAndMoveToFrontDecode(), getname(), getnum(), getRLEpair(), gettok(), glutBitmapCharacter(), glutBitmapLength(), glutBitmapWidth(), glutStrokeCharacter(), glutStrokeLength(), glutStrokeWidth(), ind_printf(), jinit_memory_mgr(), l_C(), l_CHAR(), l_L(), l_R(), l_read(), loadAndRLEsource(), main(), mri_read_ppm(), mri_read_ppm3(), mri_read_ppm_header(), mri_try_7D(), mri_try_mri(), mri_try_pgm(), NC_check_name(), parse_switches(), pbm_getc(), plotpak_pwrit(), plotpak_pwritf(), ppmd_text(), process_COM(), pwrit_(), pwritf_(), rd_A(), rd_AW(), rd_count(), rd_ed(), rd_F(), rd_H(), rd_I(), rd_L(), rd_POS(), rd_Z(), read_pbm_integer(), read_scan_integer(), read_text_integer(), REG_command_line(), set_quant_slots(), Strchr(), t_getc(), text_getc(), TFIM_getopts(), THD_unzblock(), THD_zblock(), tross_Add_Note(), tross_Addto_History(), tross_Append_History(), tross_commandline(), tross_Copy_History(), tross_datetime(), tross_Encode_String(), tross_Expand_String(), tross_Get_History(), tross_Get_Note(), tross_Make_History(), tross_Replace_History(), tross_Store_Note(), TT_read_opts(), TTget_ppm(), undoReversibleTransformation_fast(), undoReversibleTransformation_small(), x_getc(), x_rsne(), xrd_SL(), y_getc(), zzchar_(), and zzstro_().

else no comments CnoCom = []
 

Definition at line 113 of file PurgeComments.m.

increment and go on cnt = 1
 

Definition at line 94 of file PurgeComments.m.

Com = ''
 

Definition at line 45 of file PurgeComments.m.

end looks like it is a comment
 

Definition at line 72 of file PurgeComments.m.

Referenced by blank_frameset(), Gif_CopyImage(), list_decls(), ply_put_comment(), SUMA_readFScurv(), and wr_struct().

end Debug Flag DBG = 1
 

Definition at line 40 of file PurgeComments.m.

end[err, Loc_1] = FindChar (C, ch)
 

Definition at line 52 of file PurgeComments.m.

initailize return variables err = 1
 

Definition at line 43 of file PurgeComments.m.

FirstChunk = C(1:Loc_1(1)-1)
 

Definition at line 60 of file PurgeComments.m.

function[CnoCom]
 

Initial value:

 PurgeComments (C, ch)
%
%   [CnoCom] = PurgeComments (C, [ch])
%
%Purpose:
%   purges all matlab coments from character array
%   
%   
%Input Parameters:
%   C : character array
%   ch : is the character indicating a comment line

Definition at line 1 of file PurgeComments.m.

end end end copy the next good if you did not run out of cnt in the looping condition above GoodChunk = C(cend+1:Loc_1(cnt+1)-1)
 

Definition at line 87 of file PurgeComments.m.

end end append last piece if any LastChunk = NextString (C, 'NewLine', Loc_1(cnt)) C(cend+1:nC)
 

Definition at line 101 of file PurgeComments.m.

skip that line[err, Cnext, cend] = NextString (C, 'NewLine', Loc_1(cnt))
 

Definition at line 68 of file PurgeComments.m.

else lop = 1
 

Definition at line 71 of file PurgeComments.m.

nC = length(C)
 

Definition at line 57 of file PurgeComments.m.

nCnoCom = length(FirstChunk)
 

Definition at line 103 of file PurgeComments.m.

default is Output Parameters
 

Definition at line 1 of file PurgeComments.m.

end end end copy the next good piece
 

Definition at line 84 of file PurgeComments.m.

Referenced by calculate_results(), check_volume(), delete_volume(), main(), read_volume(), and save_pieces().

end return
 

Definition at line 116 of file PurgeComments.m.

 

Powered by Plone

This site conforms to the following standards: