Mega Search
23.2 Million


Sign Up

Make a donation  
workspace deleted when creating legend  
News Group: comp.soft-sys.matlab

I have encountered something very strange. When I create a legend it is clearing my workspace. I don't remember ever seeing this before, could it be some setting that has been modified?

a=pi;
b='text';
fh=figure;
plot([1:10])
whos
lh=legend('test');
whos

gives the following output:

  Name      Size            Bytes  Class               Attributes

  a         1x1                 8  double                        
  b         1x4                 8  char                          
  fh        1x1               112  matlab.ui.Figure              

  Name      Size            Bytes  Class                                  Attributes

  lh        1x1               112  matlab.graphics.illustration.Legend 


I'm using R2014b on linux.

>> which -all legend
/toolbox/matlab/scribe/legend.m
>> ls -l /toolbox/matlab/scribe/legend.m
-r--r--r-- 1 admin grp 12345 Mar  5  2014 /toolbox/matlab/scribe/legend.m

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 29-Aug-2016, at 9:23 AM EST
From: craq
 
Re: workspace deleted when creating legend  
News Group: comp.soft-sys.matlab
after restarting matlab, I can no longer reproduce this problem.

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 29-Aug-2016, at 10:33 AM EST
From: craq