Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Matlab weirdness

Subject: Matlab weirdness

From: Jonathan

Date: 22 Feb, 2012 16:47:20

Message: 1 of 3

I have a few questions related to running Matlab on two different computers. I recently installed Matlab on my new machine with Matlab R2011b, 64-bit (win64); the other machine has R2011a. Install occurred without a hitch.

The first relates to use of the "waitbar" function in a piece of code. On my machine (2011b), a warning is issued when the waitbar option is executed i.e."Warning: axes YTickLabels has been renamed YTickLabel for consistency with all other
mode/value property pairs, whose root names are singular, not plural. In Waitbar at 37.
On the other machine this message does not show. Is there a way to suppress this message?

The second issue is I have tried running the full code on the two machines. On my machine (R2011b) the code runs and then hangs. On the other machine (R2011a) it executes fine, with no warnings/messages. Any reason why this would occur?

Third, why does this code not work on my new machine, but works on the old machine...
load C:\DATA\DOGAMI_projects\FEMA - CLATSOP CTY\temp\buoys\46089_Tillamook\tm_46089_pst_H0.mat;
buoy2=tm_46089;
Error using load
Unknown command option.

whereas this works fine...
cd ('C:\DATA\DOGAMI_projects\FEMA - CLATSOP CTY\temp\buoys\46089_Tillamook')
data = load('tm_46089_pst_H0.mat'); buoy2=data.tm_46089;

This is all a little puzzling. Should I try reinstalling Matlab?

Thanks
Jon

Subject: Matlab weirdness

From: Steven_Lord

Date: 22 Feb, 2012 17:54:22

Message: 2 of 3



"Jonathan " <jkakiwi@yahoo.co.uk> wrote in message
news:ji366o$cja$1@newscl01ah.mathworks.com...
> I have a few questions related to running Matlab on two different
> computers. I recently installed Matlab on my new machine with Matlab
> R2011b, 64-bit (win64); the other machine has R2011a. Install occurred
> without a hitch.
>
> The first relates to use of the "waitbar" function in a piece of code. On
> my machine (2011b), a warning is issued when the waitbar option is
> executed i.e."Warning: axes YTickLabels has been renamed YTickLabel for
> consistency with all other
> mode/value property pairs, whose root names are singular, not plural. In
> Waitbar at 37. On the other machine this message does not show. Is there a
> way to suppress this message?

Line 37 of the waitbar.m included in release R2011b is a blank line between
two comment lines. That plus the case of the word "Waitbar" in the error
suggests that your new machine has a different version of Waitbar.m that you
downloaded from somewhere on the MATLAB path. To check this, use the WHICH
function and rename or move off your path any such function that is not
under $MATLABROOT/toolbox/matlab/uitools.

> The second issue is I have tried running the full code on the two
> machines. On my machine (R2011b) the code runs and then hangs. On the
> other machine (R2011a) it executes fine, with no warnings/messages. Any
> reason why this would occur?

If the directory containing the Waitbar.m that caused the first problem
contains other functions with the same name as functions that ship with
MATLAB, those could cause problems up to and including MATLAB getting stuck
in an endless loop.

> Third, why does this code not work on my new machine, but works on the old
> machine...
> load C:\DATA\DOGAMI_projects\FEMA - CLATSOP
> CTY\temp\buoys\46089_Tillamook\tm_46089_pst_H0.mat;

It shouldn't work on either. That line of code is equivalent to:

load('C:\DATA\DOGAMI_projects\FEMA', '-', 'CLATSOP',
'CTY\temp\buoys\46089_Tillamook\tm_46089_pst_H0.mat');

Note that you're calling LOAD with four input arguments; each input argument
begins or ends at the space in your path name.

I would also recommend calling LOAD with an output argument to avoid
"poofing", as has been discussed on this newsgroup often.

> buoy2=tm_46089;
> Error using load
> Unknown command option.
>
> whereas this works fine...
> cd ('C:\DATA\DOGAMI_projects\FEMA - CLATSOP
> CTY\temp\buoys\46089_Tillamook')
> data = load('tm_46089_pst_H0.mat'); buoy2=data.tm_46089;
>
> This is all a little puzzling. Should I try reinstalling Matlab?

The first and third issues are (mostly) resolved -- I'm not entirely certain
why your first section of code for the third problem ran on the old machine.

If my suspicion is correct, the solution for the first issue may resolve the
second issue as well.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: Matlab weirdness

From: Jonathan

Date: 22 Feb, 2012 18:16:21

Message: 3 of 3

"Steven_Lord" <slord@mathworks.com> wrote in message <ji3a4d$psd$1@newscl01ah.mathworks.com>...
>
>
> "Jonathan " <jkakiwi@yahoo.co.uk> wrote in message
> news:ji366o$cja$1@newscl01ah.mathworks.com...
> > I have a few questions related to running Matlab on two different
> > computers. I recently installed Matlab on my new machine with Matlab
> > R2011b, 64-bit (win64); the other machine has R2011a. Install occurred
> > without a hitch.
> >
> > The first relates to use of the "waitbar" function in a piece of code. On
> > my machine (2011b), a warning is issued when the waitbar option is
> > executed i.e."Warning: axes YTickLabels has been renamed YTickLabel for
> > consistency with all other
> > mode/value property pairs, whose root names are singular, not plural. In
> > Waitbar at 37. On the other machine this message does not show. Is there a
> > way to suppress this message?
>
> Line 37 of the waitbar.m included in release R2011b is a blank line between
> two comment lines. That plus the case of the word "Waitbar" in the error
> suggests that your new machine has a different version of Waitbar.m that you
> downloaded from somewhere on the MATLAB path. To check this, use the WHICH
> function and rename or move off your path any such function that is not
> under $MATLABROOT/toolbox/matlab/uitools.
>
> > The second issue is I have tried running the full code on the two
> > machines. On my machine (R2011b) the code runs and then hangs. On the
> > other machine (R2011a) it executes fine, with no warnings/messages. Any
> > reason why this would occur?
>
> If the directory containing the Waitbar.m that caused the first problem
> contains other functions with the same name as functions that ship with
> MATLAB, those could cause problems up to and including MATLAB getting stuck
> in an endless loop.
>
> > Third, why does this code not work on my new machine, but works on the old
> > machine...
> > load C:\DATA\DOGAMI_projects\FEMA - CLATSOP
> > CTY\temp\buoys\46089_Tillamook\tm_46089_pst_H0.mat;
>
> It shouldn't work on either. That line of code is equivalent to:
>
> load('C:\DATA\DOGAMI_projects\FEMA', '-', 'CLATSOP',
> 'CTY\temp\buoys\46089_Tillamook\tm_46089_pst_H0.mat');
>
> Note that you're calling LOAD with four input arguments; each input argument
> begins or ends at the space in your path name.
>
> I would also recommend calling LOAD with an output argument to avoid
> "poofing", as has been discussed on this newsgroup often.
>
> > buoy2=tm_46089;
> > Error using load
> > Unknown command option.
> >
> > whereas this works fine...
> > cd ('C:\DATA\DOGAMI_projects\FEMA - CLATSOP
> > CTY\temp\buoys\46089_Tillamook')
> > data = load('tm_46089_pst_H0.mat'); buoy2=data.tm_46089;
> >
> > This is all a little puzzling. Should I try reinstalling Matlab?
>
> The first and third issues are (mostly) resolved -- I'm not entirely certain
> why your first section of code for the third problem ran on the old machine.
>
> If my suspicion is correct, the solution for the first issue may resolve the
> second issue as well.
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

Steve, thank you. Problem solved. I had an old antiquated version of waitbar in one of my code folders. This resolved the first two problems. I now also better understand the issue with directory paths.

Thanks
Jon

Tags for this Thread

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.

Contact us