Prev: p-values for crosscorrelation?
Next: matlab code for energy detection spectrum sensing in cognitive radio using AWGN channel
From: jorge on 23 May 2010 15:48 Hi. How to get the root path for my application (guide) For example: d:\samples\code\start.m How can I get the root whole path from code start.m while running start.m (without writting it like p='d:\samples\code\') I want something like p=getApplicationRootPath(); Thanks.
From: ImageAnalyst on 23 May 2010 16:38 Did you check out the "mfilename" function?
From: jorge on 23 May 2010 16:56 ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <f8958f1c-6951-46ca-9541-e0f5d11a236f(a)b21g2000vbh.googlegroups.com>... > Did you check out the "mfilename" function? You saved my life:). Thanks a lot!
From: ImageAnalyst on 23 May 2010 17:12
Here's a handy little chunk of code that will prevent a bunch of potential error messages, if you happen to run your macro with the current working direction not being the directory where your m-file lives: % Change the current folder to the folder of this m-file. % (The line of code below is from Brett Shoelson of The Mathworks.) if(~isdeployed) cd(fileparts(which(mfilename))); end |