Hello,
I am using MATLAB (64 bit) 7.10 installed under ubuntu.
I have these m-files to do some data processing, which call other functions that I have written and stored in a directory. I have previously run these m-files in MATLAB under WINDOWS without a problem. Now, in ubuntu, I verified a couple of times that these scripts also ran without a problem. But now, all of a sudden it keeps giving an error saying "Undefined function or method xyz for input arguments of the type double", where xyz.m is a function that is called by this script.
This is even though I have specified the path to the file xyz.m. In addition, the command "exist xyz" gives me the output 2 and "which xyz" gives me the path to where the file xyz.m is stored. So, it all looks fine, so I am not sure what is happening. Also, this error does not occur if I shift the file xyz.m to the current working directory. I do not want to do this as there are many such files stored in a separate directory and all accessed by the data processing scripts.
So, I am not at all clear why this should be happening. Maybe there is something obvious which I am missing. To give a slightly more concrete idea, here is a few lines from the main data processing code which calls calc_deltat.m (which is stored in a directory which is in the current path of MATLAB) , and running which gives an error: Undefined function or method 'calc_deltat' for input arguments of type 'double'
--------------------------------------------------------------------------------------------------------
a = textread('mar16_05.txt');
ht = textread('ht-mar16_05.txt');
%%-------------------------------------------------------------------------------------------------------
time = a(:,1);
time = time - time(1);%% This just takes care that in case (due to some reason
%% connected with data logger, the first time is
%% not zero seconds; we would prefer it to be so.
%the mean time difference between readings is calculated by calc_deltat
deltat= calc_deltat(time);
--------------------------------------------------------------------------------
Thanks a lot!
--Mukund
|
|
0
|
|
|
|
Reply
|
mukund
|
2/22/2011 5:22:04 PM |
|
"mukund " <mukund.vn@gmail.com> wrote in message <ik0rbs$ga7$1@fred.mathworks.com>...
> Hello,
>
> I am using MATLAB (64 bit) 7.10 installed under ubuntu.
> I have these m-files to do some data processing, which call other functions that I have written and stored in a directory. I have previously run these m-files in MATLAB under WINDOWS without a problem. Now, in ubuntu, I verified a couple of times that these scripts also ran without a problem. But now, all of a sudden it keeps giving an error saying "Undefined function or method xyz for input arguments of the type double", where xyz.m is a function that is called by this script.
>
> This is even though I have specified the path to the file xyz.m. In addition, the command "exist xyz" gives me the output 2 and "which xyz" gives me the path to where the file xyz.m is stored. So, it all looks fine, so I am not sure what is happening. Also, this error does not occur if I shift the file xyz.m to the current working directory. I do not want to do this as there are many such files stored in a separate directory and all accessed by the data processing scripts.
One "easy" solution is to include the directory in your MATLAB path
and add that path to your MATLAB start-up file.
>
> So, I am not at all clear why this should be happening. Maybe there is something obvious which I am missing. To give a slightly more concrete idea, here is a few lines from the main data processing code which calls calc_deltat.m (which is stored in a directory which is in the current path of MATLAB) , and running which gives an error: Undefined function or method 'calc_deltat' for input arguments of type 'double'
> --------------------------------------------------------------------------------------------------------
> a = textread('mar16_05.txt');
> ht = textread('ht-mar16_05.txt');
>
> %%-------------------------------------------------------------------------------------------------------
> time = a(:,1);
>
> time = time - time(1);%% This just takes care that in case (due to some reason
> %% connected with data logger, the first time is
> %% not zero seconds; we would prefer it to be so.
>
> %the mean time difference between readings is calculated by calc_deltat
> deltat= calc_deltat(time);
> --------------------------------------------------------------------------------
> Thanks a lot!
>
> --Mukund
|
|
0
|
|
|
|
Reply
|
someone
|
2/22/2011 6:36:04 PM
|
|
Hello,
"someone" wrote in message <ik0vmk$88r$1@fred.mathworks.com>...
> "mukund " <mukund.vn@gmail.com> wrote in message <ik0rbs$ga7$1@fred.mathworks.com>...
> > Hello,
> >
> > I am using MATLAB (64 bit) 7.10 installed under ubuntu.
> > I have these m-files to do some data processing, which call other functions that I have written and stored in a directory. I have previously run these m-files in MATLAB under WINDOWS without a problem. Now, in ubuntu, I verified a couple of times that these scripts also ran without a problem. But now, all of a sudden it keeps giving an error saying "Undefined function or method xyz for input arguments of the type double", where xyz.m is a function that is called by this script.
> >
> > This is even though I have specified the path to the file xyz.m. In addition, the command "exist xyz" gives me the output 2 and "which xyz" gives me the path to where the file xyz.m is stored. So, it all looks fine, so I am not sure what is happening. Also, this error does not occur if I shift the file xyz.m to the current working directory. I do not want to do this as there are many such files stored in a separate directory and all accessed by the data processing scripts.
>
> One "easy" solution is to include the directory in your MATLAB path
> and add that path to your MATLAB start-up file.
Thanks. I will try this out. But I am not sure I understand. Is this not equivalent to adding the directory in my path and saving the path for future sessions?
>
> >
> > So, I am not at all clear why this should be happening. Maybe there is something obvious which I am missing. To give a slightly more concrete idea, here is a few lines from the main data processing code which calls calc_deltat.m (which is stored in a directory which is in the current path of MATLAB) , and running which gives an error: Undefined function or method 'calc_deltat' for input arguments of type 'double'
> > --------------------------------------------------------------------------------------------------------
> > a = textread('mar16_05.txt');
> > ht = textread('ht-mar16_05.txt');
> >
> > %%-------------------------------------------------------------------------------------------------------
> > time = a(:,1);
> >
> > time = time - time(1);%% This just takes care that in case (due to some reason
> > %% connected with data logger, the first time is
> > %% not zero seconds; we would prefer it to be so.
> >
> > %the mean time difference between readings is calculated by calc_deltat
> > deltat= calc_deltat(time);
> > --------------------------------------------------------------------------------
> > Thanks a lot!
> >
> > --Mukund
|
|
0
|
|
|
|
Reply
|
mukund.vn
|
2/28/2011 5:29:25 PM
|
|
|
2 Replies
235 Views
(page loaded in 0.092 seconds)
|