From: Alex Eptas on 25 Jul 2010 16:57 "us " <us(a)neurol.unizh.ch> wrote in message <i2i62f$aot$1(a)fred.mathworks.com>... > "Alex Eptas" <fe09ae(a)mail.wbs.ac.uk> wrote in message <i2i528$7uv$1(a)fred.mathworks.com>... > > "us " <us(a)neurol.unizh.ch> wrote in message <i2i2p6$g0o$1(a)fred.mathworks.com>... > > > "Alex Eptas" <fe09ae(a)mail.wbs.ac.uk> wrote in message <i2hsgg$hhv$1(a)fred.mathworks.com>... > > > > Hi Rune > > > > Sorry if you think i am wining, i am a very basic user, obviously things like this are very easy to you. When i try the specific example you have it works find. However when i try to use it to get a list of stocks or dates for the entire data set it does not work; > > > > > > > > rootDir = 'C:\Desktop\Dissertation Data\lseTickBins\'; > > > > > > > > tmp = dir([rootDir '*.csv']); % Note with the csv files you need '*.csv' NOT '*.*.csv' > > > > > > one of the many solutions > > > > > > flst=dir(...); % <- your DIR command... > > > flst={flst.name}.'; > > > up=regexp(flst,'_','once'); % <- in case there is more than one underscore... > > > % or: STRFIND()... > > > up=[up{:}]; > > > > > > us > > > > > > Many thanks for your code which worked find. > > When i have created the up vector how do i get the list of dates or stocks.? > > thanks > > well... > one of the solutions > - to simply extract the trailing dates... > > % the data > % - assume this is how your FLST looks like... > flst={ > 'ab_20080101' > 'c_20090202' > 'def_20100303' > }; > % the engine > r=regexp(flst,'(?<=_)\d+','match'); > r=[r{:}]; > % the result > disp(r); > %{ > '20080101' > '20090202' > '20100303' > %} > > us Thanks for your help it is much appreciated
First
|
Prev
|
Pages: 1 2 3 Prev: Location of detected image using boundary trace Next: Contour plot on 3D surface |