From: TideMan on 10 May 2010 17:11 On May 11, 8:53 am, "Ali Culp" <alic...(a)hotmail.com> wrote: > > Well why not simply reproduce exactly what you do in DOS? > > system('dcm2nii -o C:\Vesta C:\Vesta') > > This assumes you have dcm2nii in the path. > > If not, then assuming dcm2nii.exe is in the directory, you could do > > this: > > pgm='"C:\Documents and Settings\Administrator\Desktop\Ali\mricron > > \dcm2nii"'; > > then: > > system([pgm ' -o C:\Vesta C:\Vesta']) > > Note: I think you'll need double quotes because of the spaces in the > > directory name. > > The problem is there are TWO commands that I have to give DOS...the first is to change where it's looking for the file >>cd C:\Documents...\mricron and the second is to tell it to run the dcm2nii program >>dcm2nii -o C:\Vesta C:\Vesta. Is there a way that I can do something like this in matlab: >>system('command 1','command 2')? If so let me know how!! Well, you can cd in Matlab first, do your calcs, then cd back: oldpth=pwd; cd('C:\Documents...\mricron') system('dcm2nii -o C:\Vesta C:\Vesta') cd(oldpth)
From: Ali Culp on 10 May 2010 18:28 Wow so simple. Thanks!
First
|
Prev
|
Pages: 1 2 Prev: can't install MCR on ubuntu8.10 amd64 Next: Interfacing C with a matlab gui |