From: bubai marik on 8 Apr 2010 08:50 i am creating a function file in matlab,that takes an image file as input argument.now problem is to open a .dat file i have to use load() and to open a .tif file have to use imread() file.now I want to check the input file extension in my function so that depends on that i can use load() or imread().please reply as soon as possible.its very urgent.
From: Walter Roberson on 8 Apr 2010 09:36 bubai marik wrote: > i am creating a function file in matlab,that takes an image file as > input argument.now problem is to open a .dat file i have to use load() > and to open a .tif file have to use imread() file.now I want to check > the input file extension in my function so that depends on that i can > use load() or imread().please reply as soon as possible.its very urgent. fileparts() and do string comparison on the extension you extract. (I don't actually use this approach myself, but then my suffix-extraction code for my current project is designed around the fact that we can end up with multiple suffixes, such as .txt.mat .)
|
Pages: 1 Prev: open raw audio files Next: Som toolbox (neurol network)(neural network clustering) |