Dear Sterling:
Just use the Matlab fileparts command.
For example using the fully qualified filename returned by spm_get of
'/data/mydata/myimage.img'
[ pth fn ext ] = fileparts('/data/mydata/myimage.img');
pth = '/data/mydata'
fn = 'myimage'
ext = '.img'
darren
At 02:50 AM 10/2/2005, Sterling Johnson wrote:
>Dear SPMers
>I'd like to use spm_get to select file names into a string matrix. It
>provides the absolute path to the filename; I need the filename
>itself--without the path. is there an easy way to do this?
>
>thanks
>Sterling
>
>
>
>
>Sterling C. Johnson, Ph.D.
>Assistant Professor of Medicine
>University of Wisconsin Medical School
>
>Madison VA Hospital
>GRECC
>2500 Overlook Terrace (11G),
>Madison WI 53705
>phone 608-256-1901 x 11946
>fax 608-280-7165
>email: [log in to unmask]
|