Thread Subject:
Undefined function or variable

Subject: Undefined function or variable

From: Irina Schelkanova

Date: 17 Jul, 2012 16:32:08

Message: 1 of 5

Hello,

Can anyone help please?

I am working with the Monte Carlo output .2pt extension files. There is a function which can read those files in Matlab.

"[data,seg] = loadMC2pt(filename);" but when I substitute the filename with my output file (s1), the program gives an error: "Undefined function or variable 's1'". All the paths are set.
Thanks

Irina

Subject: Undefined function or variable

From: someone

Date: 17 Jul, 2012 17:59:28

Message: 2 of 5

Irina Schelkanova <irina.schelkanova@gmail.com> wrote in message <6286ef90-8070-49a8-8317-65dd9e0d099d@googlegroups.com>...
> Hello,
>
> Can anyone help please?
>
> I am working with the Monte Carlo output .2pt extension files. There is a function which can read those files in Matlab.
>
> "[data,seg] = loadMC2pt(filename);" but when I substitute the filename with my output file (s1), the program gives an error: "Undefined function or variable 's1'". All the paths are set.
> Thanks
>
> Irina

How do you call loadMC2pt?

Try using either:

[data,seg] = loadMC2pt('s1');

or

filename = 's1';
[data,seg] = loadMC2pt(filename);

assuming s1 is the name of your file.

If neither works, show us a sniplet of your code.

Subject: Undefined function or variable

From: Irina Schelkanova

Date: 17 Jul, 2012 19:02:25

Message: 3 of 5

The secon version worked but then I had another problem:

>> direct=[pwd '\'];
filenm='s1';
>> [data,seg] = loadMC2pt(filenm);
Subscripted assignment dimension mismatch.

Error in MCConfig (line 68)
mc.nSrc(1) = fscanf( fid, '%d', 1);

Error in loadMC2pt (line 26)
mc = MCConfig(filenm);

I was told that this program will just read the files from the directory. Apparently something is not working!



On Tuesday, July 17, 2012 1:59:28 PM UTC-4, someone wrote:
> Irina Schelkanova <irina.schelkanova@gmail.com> wrote in message <6286ef90-8070-49a8-8317-65dd9e0d099d@googlegroups.com>...
> > Hello,
> >
> > Can anyone help please?
> >
> > I am working with the Monte Carlo output .2pt extension files. There is a function which can read those files in Matlab.
> >
> > "[data,seg] = loadMC2pt(filename);" but when I substitute the filename with my output file (s1), the program gives an error: "Undefined function or variable 's1'". All the paths are set.
> > Thanks
> >
> > Irina
>
> How do you call loadMC2pt?
>
> Try using either:
>
> [data,seg] = loadMC2pt('s1');
>
> or
>
> filename = 's1';
> [data,seg] = loadMC2pt(filename);
>
> assuming s1 is the name of your file.
>
> If neither works, show us a sniplet of your code.

Subject: Undefined function or variable

From: Irina Schelkanova

Date: 17 Jul, 2012 18:55:54

Message: 4 of 5

Thanks I will try


On Tuesday, July 17, 2012 1:59:28 PM UTC-4, someone wrote:
> Irina Schelkanova <irina.schelkanova@gmail.com> wrote in message <6286ef90-8070-49a8-8317-65dd9e0d099d@googlegroups.com>...
> > Hello,
> >
> > Can anyone help please?
> >
> > I am working with the Monte Carlo output .2pt extension files. There is a function which can read those files in Matlab.
> >
> > "[data,seg] = loadMC2pt(filename);" but when I substitute the filename with my output file (s1), the program gives an error: "Undefined function or variable 's1'". All the paths are set.
> > Thanks
> >
> > Irina
>
> How do you call loadMC2pt?
>
> Try using either:
>
> [data,seg] = loadMC2pt('s1');
>
> or
>
> filename = 's1';
> [data,seg] = loadMC2pt(filename);
>
> assuming s1 is the name of your file.
>
> If neither works, show us a sniplet of your code.

Subject: Undefined function or variable

From: someone

Date: 17 Jul, 2012 20:18:09

Message: 5 of 5

Irina Schelkanova <irina.schelkanova@gmail.com> wrote in message <86d3d1ce-30e6-4b6a-8604-5bf176296418@googlegroups.com>...
> The secon version worked but then I had another problem:
>
> >> direct=[pwd '\'];
> filenm='s1';
> >> [data,seg] = loadMC2pt(filenm);
> Subscripted assignment dimension mismatch.
>
> Error in MCConfig (line 68)
> mc.nSrc(1) = fscanf( fid, '%d', 1);
>
> Error in loadMC2pt (line 26)
> mc = MCConfig(filenm);
>
> I was told that this program will just read the files from the directory. Apparently something is not working!
>

Without knowing the details of the ".2pt" file format or
loadMC2pt or MSConfig functions
there is not much more that can be done
without actually running the MATLAB debugger.

>
>
> On Tuesday, July 17, 2012 1:59:28 PM UTC-4, someone wrote:
> > Irina Schelkanova <irina.schelkanova@gmail.com> wrote in message <6286ef90-8070-49a8-8317-65dd9e0d099d@googlegroups.com>...
> > > Hello,
> > >
> > > Can anyone help please?
> > >
> > > I am working with the Monte Carlo output .2pt extension files. There is a function which can read those files in Matlab.
> > >
> > > "[data,seg] = loadMC2pt(filename);" but when I substitute the filename with my output file (s1), the program gives an error: "Undefined function or variable 's1'". All the paths are set.
> > > Thanks
> > >
> > > Irina
> >
> > How do you call loadMC2pt?
> >
> > Try using either:
> >
> > [data,seg] = loadMC2pt('s1');
> >
> > or
> >
> > filename = 's1';
> > [data,seg] = loadMC2pt(filename);
> >
> > assuming s1 is the name of your file.
> >
> > If neither works, show us a sniplet of your code.

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us