f



Is there a way to clear axes labels?

I have a level-2 m-file s-function within my Simulink model, and this s-function is specified by my corresponding m-file. The purpose of this m-file/s-function is to display an animation that is updated at each timestep of the Simulink model.

I’ve been able use this m-file to correctly display my animation. I perform sets of animations, and then want to display a “set complete” message, before the next set of animations begins. So far, I’ve used the code below, within my Update() function, to implement this “set complete” message:
--------------------------------------------------

if(TaskComplete == 1.0)
      
   axes;
   set(axesHandle, 'Xlim', [-0.7 0.7], 'Ylim', [-0.2 0.7]);
   %set(gca, 'Xlim', [-0.7 0.7], 'Ylim', [-0.2 0.7]);
   set(gca,'Color','w');
   
   endMessage = sprintf('Set Complete!');
   set(text(0.4,0.6,endMessage), 'FontWeight', 'bold', 'FontName', 'Arial', 'Color', [0,0,0]);
   
 end
----------------------------------------------------

Here’s my problem: although the “set complete” message appears correctly on my axes, there are *two* sets of axes numerical labels superimposed over each other when this “complete” screen displays. The set(axesHandle, ‘Xlim’, …) line above is also used elsewhere within my m-file, to *correctly* set my axes’ numerical labels. I’m not sure why re-using that same line above, causes 2 completely different sets of labels to be superimposed on each other. 

If I remove the set(axesHandle, ‘Xlim’, …) line from above, nothing changes; there are still 2 sets of axes labels displayed. 

If I replace the set(axesHandle, ‘Xlim’,…) line with the following line:
set(gca, 'Xlim', [-0.7 0.7], 'Ylim', [-0.2 0.7]);

… the single correct set of (now-unwanted) axes labels are displayed, but my text message displays in the screen’s corner instead of in the center, where I want it. 

Ideally, I would like to completely remove all numerical axes labels while the “set complete” message displays, and have my text message display in the center of the screen. 

Reviewing the Mathworks set() function's documentation didn't seem to present an answer to these issues.

Does anyone have advice about how I can just clear *all* axes labels from my axes while my “set complete” message displays, and ensure that my text message always displays in the center of the panel? Thanks in advance for your input. 
0
kmj.work (178)
3/31/2012 12:06:19 AM
comp.soft-sys.matlab 211265 articles. 25 followers. lunamoonmoon (257) is leader. Post Follow

8 Replies
515 Views

Similar Articles

[PageSpeed] 55

Do you mean the labels associated with the tick marks, or the label
for the entire axis?  If it's the label for the entire axis, I would
think you can do
xlabel([]);

There is also code for setting tick labels:
set(gca,'YTickLabel','0|0.05|Cutoff|0.1|0.15|0.2|0.25')
That's from the help.  I would imagine you could just set all the
ticks to null [].

Have you tried
cla reset;
???
0
imageanalyst (7621)
3/31/2012 2:18:27 AM
> Here’s my problem: although the “set complete” message appears correctly on my axes, there are *two* sets of axes numerical labels superimposed over each other when this “complete” screen displays. The set(axesHandle, ‘Xlim’, …) line above is also used elsewhere within my m-file, to *correctly* set my axes’ numerical labels. I’m not sure why re-using that same line above, causes 2 completely different sets of labels to be superimposed on each other. 

Everytime you call the function axes you are creating a new axis (with its own properties).
I suspect the what you really want to do is have one axis and just put a text "set complete" onto it, then delete the message when you're done.

However if you do want to use multiple axes to do it, then the command to remove all axis labels from any given axis is
set(axisHandle,'XTick',[],'YTick',[]);

Phil.
0
phil986 (332)
3/31/2012 3:39:12 PM
On Mar 31, 11:39=A0am, "Phil Goddard" <p...@goddardconsulting.ca> wrote:
> Everytime you call the function axes you are creating a new axis (with it=
s own properties).
> Phil.
------------------------------------------------------------------------
Except when you pass in the handle to an existing axes.  In that case
it just switches focus to that existing axes control you passed in
(makes it the "current" axes or "gca") - it does not create a new axes
control or a new axis.

0
imageanalyst (7621)
3/31/2012 6:03:22 PM
Thanks for your response, Phil. 

>> Everytime you call the function axes you are creating a new axis (with its own properties).
>> I suspect the what you really want to do is have one axis and just put a text "set complete" onto it, then delete the message when you're done.

You're correct that I definitely don't want to create a new axis each time a set completes; I removed my call to 'axes', and I successfully use your suggested call 

set(gca,'XTick',[],'YTick',[]);

to clear the axes labels at the "set complete" message screen. 

However, I'm still encountering a few issues: 

~ My current code is the following:
set(gca,'XTick',[],'YTick',[]);
endMessage = sprintf('Set Complete!');
set(text(0.0,0.0,endMessage), 'FontWeight', 'bold', 'FontName', 'Arial', 'Color', [0,0,0]);

   -- although the axes labels do clear as desired, my animated object still remains on the panel even though I want it to disappear, and the text message displays in the bottom-right area of the screen, when I want it to appear in the center. 

~ If I add either of the following lines, intended to clear the axes:
cla(gca);
cla(gca, 'reset');

   ... when the execution reaches either line, I get a popup Simulink error message, "invalid handle object", even though I'm able to successfully use the "gca" object in my other code above. (And, oddly, even though I don't make any additional changes to my code apart from adding one of the above lines, the text message moves to a very odd location at the very bottom-left of the panel, outside of the display area).  
     -- I'm not averse to playing around with testing various values for the text display to discover where the center of the screen is, but the above issue makes it seem impossible to even predict where the text message will end up displaying... Any clarification about how this text-message location is set is appreciated. 

--> any suggestions about how I can successfully clear the *entire* display panel when I want my "set complete" message to display, and just display my desired text message in the *center* of the screen? (...without preventing a restart of my Simulink model from then correctly displaying my next set of animations afterwards?)

Thanks!
0
kmj.work (178)
3/31/2012 6:30:30 PM
You don't need gca - it's redundant.  You can simply do

cla;

or,

cla reset;  % gca, and single quotes or parentheses not needed.

If you really want everything to vanish, you have to use findobj() to
find all children and set their visibility to 'off' or else put the
whole axes inside a panel and set the panel visibility 'off' using the
set() command.
0
imageanalyst (7621)
3/31/2012 8:11:12 PM
> set(text(0.0,0.0,endMessage), 'FontWeight', 'bold', 'FontName', 'Arial', 'Color', [0,0,0]);
> 
>    -- although the axes labels do clear as desired, my animated object still remains on the panel even though I want it to disappear, and the text message displays in the bottom-right area of the screen, when I want it to appear in the center. 

The text message is appearing at the x=0, y=0 location of the current axis limts.
(That's what the first 2 inputs to the text function are doing.)

> ~ If I add either of the following lines, intended to clear the axes:
> cla(gca);
> cla(gca, 'reset');
> 
>    ... when the execution reaches either line, I get a popup Simulink error message, "invalid handle object", even though I'm able to successfully use the "gca" object in my other code above. (And, oddly, even though I don't make any additional changes to my code apart from adding one of the above lines, the text message moves to a very odd location at the very bottom-left of the panel, outside of the display area).

The error is occuring due to trying to delete an object that has already been deleted (and hence the handle isn't valid any more).
Why that is only you can tell (as we don't have access to the whole code).

But the axis must be clearing, as a cleared axis reverts to having the origin in the bottom left hand corner, and your text (still being at that location) also moves to the bottom left corner.

>      -- I'm not averse to playing around with testing various values for the text display to discover where the center of the screen is, but the above issue makes it seem impossible to even predict where the text message will end up displaying... Any clarification about how this text-message location is set is appreciated. 

Your code makes it's location is purely deterministic - the origin of the axis, which with cla will be the bottom left corner.

> --> any suggestions about how I can successfully clear the *entire* display panel when I want my "set complete" message to display, and just display my desired text message in the *center* of the screen? (...without preventing a restart of my Simulink model from then correctly displaying my next set of animations afterwards?)

You either want to delete all the children of the axis (if your code recreates it for the next simulation run)
>> delete(get(gca,'Children'));

Or you can make the children invisible (and make them visible again at some later time).
>> set(get(gca,'Children'),'Visible','off');

Note that both of these need to be done before you put the text there therise the text will be delete/made invisible too.

Phil.
0
phil986 (332)
4/1/2012 3:56:12 AM
Thanks for your all of your input, Phil. With some experimentation, assisted by your last post, I got the display to appear as desired, with no error messages! 

In case you're interested, I ended up having to move my condition-check to the *end* of my Update() function to avoid the 'invalid object handle' error messages; here is my functional code: 

if(SetComplete)
  
   delete(lineHandle);                 % delete the displayed animation figure
   delete(targetHandle);             % delete the displayed target object
   set(gca,'XTick',[],'YTick',[]);    % clear axes labels 
   set(gca,'Color','c');             % change color of screen 
     
   endMessage = sprintf('Set Complete!');    % display end-of-set text message
   set(text(-0.4,0.3,endMessage), 'FontWeight', 'bold', 'FontName', 'Arial', 'FontSize', 30, 'Color', [0,0,0]);
      
end     % end if(SetComplete) condition

Thanks again! :) 
0
kmj.work (178)
4/1/2012 6:49:13 PM
Thanks for the clarifications, ImageAnalyst and Phil. 
0
kmj.work (178)
4/2/2012 10:48:12 PM
Reply:

Similar Artilces:

What is the best way to import Excel files, with stock data, into Matlab? I’m using Matlab R2010b (64-bit)
What is the best way to import Excel files, with stock data, into Matlab? I’m using Matlab R2010b (64-bit) I’m trying to import historical prices of stock data. Matlab keeps cutting off the header of each column; it gives me only values. I am thinking that this is a data-type-mixing-issue, or whatever it’s called. I have ‘Dates’ in ColumnA, and ‘MSFT’, ‘PWER’, ‘KO’, and ‘SBUX’, in ColumnB-ColumnE. Basically, if I put the Excel file in my Matlab folder and double-click the file, I see the values in a matrix (no dates and no headers), I hit ‘Next’. Then, I see only one option; one radio button is enabled – ‘Create variable matching preview’. The other two options, ‘Create vectors from each column using column names’ and ‘Create vectors from each row using row names’ – both are greyed out. I’ve seen videos, on YouTube and on the Matlab site, where people import excel data and these options are NOT greyed out. No matter what I do, there options are ALWAYS greyed out. The problem is, when I click ‘Finish’ in my ‘Workspace’ I have a variable named ‘data’ all values in a 575x4 matrix, but I have NO DATES and I have NO HEADERS on the columns. All of this seems to go into another variable, called ‘textdata’; all dates and headers ate in textdata. This is VERY inconvenient. I’m trying to analyze some stock data and I have no headers, so I have no idea which stock is which (I can figure it out, but I think Matlab should do this for me). Also, I have no dates corresponding to ...

Discontinous Axes in Matlab
Hi, I there some way to create discontinuous axes in a figure within Matlab? Say if you wanted to plot a point at infinity? Thanks, Hi, search for "BreakAXis" and "BreakXAXis" in the FEX : <http://www.mathworks.com/matlabcentral/fileexchange/loadCategory.do> J�r�me J�r�me wrote: > > > Hi, > > search for "BreakAXis" and "BreakXAXis" in the FEX : > > <http://www.mathworks.com/matlabcentral/fileexchange/loadCategory.do> > > J�r�me Perfect, Thanks, greatly appreciated. Cheers ...

Re: Labels ....Labels
It is possible. You can get the label information from SAS meta data, and create a new set of shorten label, then use it whenever needed: data xx; a=23; b='abc'; label a='one two three four five' b='123 456 789 000 xxx kkk'; run; proc print label; run; proc sql; select name||'="'||scan(label,1,' ')||' '||scan(label,2,' ')||' '||scan (label,3,' ')||'"' into :newlb separated by ' ' from sashelp.vcolumn where libname='WORK' and memname='XX' ; %put &newlb; proc print data=xx label; label &newlb; run; first proc print output: one two 123 456 three four 789 000 five xxx kkk 23 abc second proc print output with label chopped off: one two 123 456 three 789 23 abc Kind regards, Ya Huang On Tue, 30 Nov 2004 16:40:51 -0500, Nomi <sajeelm@GMAIL.COM> wrote: >Hi all, > >I'm using a dataset in which the variables have long labels. Now I >want that in the output instead of the complete label only the first >three words of the label be showed. >Is that possible? And also is their away to show only the labels and >not the variable name? > >Thanks, >Sajeel ...

Ways to clear ARP entires
Hi All , I am having the doubts on the ways to clear ARP queries. Apart from flush out the arp cache (or) timeout of each entry, is there a way to clear the ARP entires ? Consider the Scenario , Two machines say ,master and slave plumbing the same floating IP in the order. Later slave is going down. Because of this none of the requests are reaching to Master Node on the Floating IP. Please help me to clear this. Thanks, Sasikumar.V sasisoft@gmail.com wrote: > Hi All , > > I am having the doubts on the ways to clear ARP queries. Apart from > flush out the arp cache (or) timeout of each entry, is there a way to > clear the ARP entires ? > > Consider the Scenario , > > Two machines say ,master and slave plumbing the same floating IP in > the order. Later slave is going down. Because of this none of the > requests are reaching to Master Node on the Floating IP. > > > Please help me to clear this. Besides arp -d on each client obviously... Try a broadcast ping to the entire network so everyone will see traffic for the IP from the new owner and hopefully change their arp cache. Hello, Joe Beanfish a �crit : > sasisoft@gmail.com wrote: > >> I am having the doubts on the ways to clear ARP queries. Apart from >> flush out the arp cache (or) timeout of each entry, is there a way to >> clear the ARP entires ? >> >> Two machines say ,master and slave plumbing the same floating IP in >...

How to correctly and completely clear Matlab workspace?
I'm running a Matlab script that performs a set of calculations and writes the outputs to a file. Sometimes, I want to be able to run the script numerous times in a row, and get the same (consistent) set of output values for the same set of input data; however, I notice that even if I do the following: ~ "clearvars -global" at Matlab command prompt ~ "clc" at Matlab command prompt ~ delete the previous copy of the generated output file .... if I rerun the script (on the same set of input data), the results still *accumulate* the previous results. The only way that I've found to run the script without having these incorrect, accumulated values, is to completely shut down and then restart Matlab. However, doing so every time I want to re-execute the script seems unnecessary and clunky. What more, beyond what I already do above, should I be doing, to completely clear the Matlab workspace between runs? Thanks in advance for your insights. I normally just do clear all does that not work for you? --Nasser Thanks, Nasser! Yes, that works. "Kate J." <kmj.work@gmail.com> wrote in message news:jlo2g4$glb$1@newscl01ah.mathworks.com... > I'm running a Matlab script that performs a set of calculations and writes > the outputs to a file. Sometimes, I want to be able to run the script > numerous times in a row, and get the same (consistent) set of output > values for the same set of input data; h...

Matlab error: Reference to a cleared variable i
So a really annoying problem I have been running into is when I have been iterating through loops. For example, if I use a variable 'i' as my index variable in a 'for' loop, and in the loop body I have a few 'if' conditionals, it will give me this error: Reference to a cleared variable i I have something like this: for i=1:length(temp); if(something temp{i}); if(something temp{i}; ... end .... end end Any reason that this should happen? In article <eeed5e0.-1@webx.raydaftYaTP>, qrios@no.spam.hotmail.com says... > So a really annoying problem I have been running into is when I have > been iterating through loops. For example, if I use a variable 'i' as > my index variable in a 'for' loop, and in the loop body I have a few > 'if' conditionals, it will give me this error: > > Reference to a cleared variable i > > I have something like this: > for i=1:length(temp); > if(something temp{i}); > if(something temp{i}; > ... > end > .... > end > end > > Any reason that this should happen? > Do you use the variable i after the loops are finished? No I don't use the variable after the loop has ended. In fact all I have is a script containing that for loop. Anyways, now I have discovered if I run the script directly in matlab myself then I don't get that error. However, I was trying to run a script in Matlab via a ...

Ruling Clears Way For Lindows Trial
On Slashdot today: Posted by simoniker on Monday May 24, @03:16PM from the not-big-deal-yet dept. shystershep writes "Various sources are reporting that Microsoft's appeal in the Lindows trademark infringement suit was rejected by the Ninth Circuit Court of Appeals. At issue was the trial judge's decision [PDF link] to 'instruct a jury to consider only whether 'windows' was a generic term before November 1985, when the first version of Microsoft's Windows was released.' This is significant because a generic mark receives no trademark protection, and the ruling that the jury must make that determination based only on the use of the term before 1985 is a major blow to Microsoft." Interesting. -- Rick ...

Best way to fix axes for animation
Hello, I'm trying to run an animation based on a data set that I've already collected. The relevant code is here: figure; axislimits = [0 1000 -1500 1500 0 1500] for i = 1:size(MKcoord,1) plot3(X(:,i), Y(:,i), Z(:,i), 'go'); axis(axislimits); set(gca,'Color',[0.1 0.1 0.1],'Xcolor',[1 1 1],'Ycolor',[1 1 1],'Zcolor',[1,1,1]); axis square; grid on; pause(1/60); end My question is, is there a more effective way to keep the coordinate axes fixed. Prefferably, I'd like to set the axis once outside the loop, rather than re-drawing them each time. "David " <lin.dewei1@gmail.com> wrote in message <jndec7$lod$1@newscl01ah.mathworks.com>... > Hello, I'm trying to run an animation based on a data set that I've already collected. > > The relevant code is here: > > > figure; > axislimits = [0 1000 -1500 1500 0 1500] > for i = 1:size(MKcoord,1) > plot3(X(:,i), Y(:,i), Z(:,i), 'go'); axis(axislimits); > set(gca,'Color',[0.1 0.1 0.1],'Xcolor',[1 1 1],'Ycolor',[1 1 1],'Zcolor',[1,1,1]); > axis square; grid on; pause(1/60); > end > > My question is, is there a more effective way to keep the coordinate axes fixed. Prefferably, I'd like to set the axis once outside the loop, rather than re-drawing them each time. Hi David, probably setting axis limits isn't costing a lot of r...

Is there a way to Speed up Arduino-Matlab integration?
Hi All, I am hacking a printer to make it a flatbed printer. I finished all the mechanics and it is pretty much set up. All that is left is I need to hack the printer motherboard. My plan was to use an arduino. To do this, I need to accomplish a few things. 1) Send the printer an image. - I did this with command line tool: acrobat_str = ['AcroRd32 /t ' printfile.fullfile ' "' printfile.printername '" "' printfile.drivername '" "' printfile.portname '"']; d = system(acrobat_str) 2) Tap the paperfeed encoder, the rotary advance encoder, and the motor input. -The paperfeed encoder works with a dc signal. So it was easy to hack. The rotary encoder is the problem. I can't read fast enough with the arduino toolbox to pick off what signals it is outputting. I got a read frequency of around 70 Hz which is just way to low for my application. I was wondering if there was some kind of work around. Basically, is there a way to make the arduino-matlab integration at the write speed of the arduino (70 kHz). There can be some buffer, but if we can get it close that would probably work. Alternatively, I could use a stepper motor and bypass this solution altogether. That is much easier, but it doesn't leverage the existing hardware as much as I would like. Let me know what you think. ...

Recent soft computing papers and MATLAB Toolboxes
Dear Colleagues, I would like to call your kind attention to the updated website of the Soft Computing Research Group at the University of Veszprem (Hungary) http://www.fmt.vein.hu/softcomp/ You can download MATLAB Toolboxes: - Fuzzy Clustering MATLAB Toolbox - Genetic Programming MATLAB Toolbox - Interactive Evolutionary Strategy (EASy) MATLAB Toolbox - Constrained Fuzzy Model Identification for the FMID Toolbox independent MATLAB programs related to: - Data mining * Fuzzy clustering based time-series segmentation * Supervised Fuzzy Clustering for the Identification of Fuzzy Classifiers * Fuzzy Modeling with Multidimensional Membership Functions: Grey-Box Identification and Control Design * Compact TS-Fuzzy Models through Clustering and OLS plus FIS Model Reduction * Inconsistency Analysis of Labeled Data * Star plots - MATLAB files for Graphical Representation of trace elements of clinkers - Process control and monitoring * Feedback Linearizing Control Using Hybrid Neural Networks Identified by Sensitivity Approach * Incorporating Prior Knowledge in Cubic Spline Approximation - Application to the Identification of Reaction Kinetic Models * Identification and Control of Nonlinear Systems Using Fuzzy Hammerstein Models - A Simple Fuzzy Classifier based on manuscripts in PDF about - fuzzy model based process control and monitoring - fuzzy clustering and classification - incorpor...

Recent soft computing papers and MATLAB Toolboxes
Dear Colleagues, I would like to call your kind attention to the updated website of the Soft Computing Research Group at the University of Veszprem (Hungary) http://www.fmt.vein.hu/softcomp/ You can download MATLAB Toolboxes: - Fuzzy Clustering MATLAB Toolbox - Genetic Programming MATLAB Toolbox - Interactive Evolutionary Strategy (EASy) MATLAB Toolbox - Constrained Fuzzy Model Identification for the FMID Toolbox independent MATLAB programs related to: - Data mining * Fuzzy clustering based time-series segmentation * Supervised Fuzzy Clustering for the Identification of Fuzzy Classifiers * Fuzzy Modeling with Multidimensional Membership Functions: Grey-Box Identification and Control Design * Compact TS-Fuzzy Models through Clustering and OLS plus FIS Model Reduction * Inconsistency Analysis of Labeled Data * Star plots - MATLAB files for Graphical Representation of trace elements of clinkers - Process control and monitoring * Feedback Linearizing Control Using Hybrid Neural Networks Identified by Sensitivity Approach * Incorporating Prior Knowledge in Cubic Spline Approximation - Application to the Identification of Reaction Kinetic Models * Identification and Control of Nonlinear Systems Using Fuzzy Hammerstein Models - A Simple Fuzzy Classifier based on manuscripts in PDF about - fuzzy model based process control and monitoring - fuzzy clustering and classification - incorporation of a priori knowledge in the identif...

Is there a way to auto-wrap lines in matlab editor?
In programming, I frequently write quite long lines, is there a way that when the line goes to 75 columns, the editor automatically add a terminating " ... " and then wrap the line back to automatically continue on the next line while I am trying continuously? I noticed that for "comments" in matlab, it has already implement "automatic line wrapping", but I don't know why for normal programming editing, it does not do this automatically? Anybody knows how to turn on this? I am using Matlab 7.0... (I saw in the "Preference" there is no such option...) Thanks you very much, -Lucy ...

Re: Change the label on fly, any better way? #4
Ya, =20 If your goal is to print a subset if the data try the following: =20 %macro chng_label(dsn=3D,var=3D,label=3D); =20 Proc Print data =3D &dsn label; where &var =3D "&label"; label &var =3D "&label"; run; =20 %mend chng_label; =20 Should get you there and of course you can modify this with SQL and some = macro %do-loops to do some macro array processing if automation is = needed. =20 HTH Toby Dunn=20 ________________________________ From: SAS(r) Discussion on behalf of Ya Huang Sent: Wed 12/22/2004 1:27 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Change the label on fly, any better way? Hi There, The follwing code change the variable a's label based on its value. I wonder if there is a better way to do it. I've got a feeling, the two data step in the macro can be combined. I tried to use %sysfunc and symget, but failed. Thanks Ya -------------- data xx; a=3D'breakfast'; delta=3D23; output; a=3D'lunch'; delta=3D56; output; run; %macro doit(a=3D); data _null_; set xx; if a=3D"&a"; call symput('alb',a); run; data yy; set xx; if a=3D"&a"; label a=3D"&alb"; run; proc print label; run; %mend; %doit(a=3Dbreakfast); %doit(a=3Dlunch); ...

Landmark Calculation Clears the Way To Answering How Matter Is Formed
<http://science.slashdot.org/story/12/05/28/2346220/landmark-calculation-clears-the-way-to-answering-how-matter-is-formed> <quote> "An international collaboration of scientists is reporting in landmark detail the decay process of a subatomic particle called a kaon – information that may help answer fundamental questions about how the universe began. The calculation in the study required 54 million processor hours on the IBM BlueGene/P supercomputer at Argonne National Laboratory, the equivalent of 281 days of computing with 8,000 processors. 'This calculation brings us closer to answering fundamental questions about how matter formed in the early universe and why we, and everything else we observe today, are made of matter and not anti-matter,' says a co-author of the paper." </quote> Windows no where to be seen. For serious number crunching Linux leads the way. -- Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe. -Albert Einstein On 5/29/2012 11:24 AM, Hardon wrote: > <http://science.slashdot.org/story/12/05/28/2346220/landmark-calculation-clears-the-way-to-answering-how-matter-is-formed> > > <quote> > "An international collaboration of scientists is reporting in landmark > detail the decay process of a subatomic particle called a kaon – > information that may help answer fundamental questions about how the > univer...

Re: Change the label on fly, any better way? #5
Ya Huang, The first data step (DATA _NULL_) simply creates a macro variable named 'alb' and is assigned the value of the parameter 'a'. You can eliminate that step altogether and just use the following: data xx; a='breakfast'; delta=23; output; a='lunch'; delta=56; output; run; %macro doit(a) ; data yy ; set xx ; if a = "&a" ; label a "&a" ; run ; proc print data=yy label ; run ; %mend doit ; %doit(breakfast) ; %doit(lunch) ; You'll want to take the first data step out of the macro since once it creates the data set name 'xx' then that data set doesn't change so there's no need to create it every time you run the macro. While this may be what you've asked for, it may not be what you really want or need. The question is what are you really trying to do? I'm not sure I see the value in a PROC PRINT on a subset of a data set with the column and all of the data in that column with the same name. If what you really want is a PROC PRINT with each of the values of a specific variable grouped together, that's a different problem with a different solution. One of those solutions would be: Proc sort data=xx ; by a ; run ; Proc print data=xx ; by a ; run ; While you likely can't get it to have the label as the specific value of the variable, you may find that something like this is much closer to what you're ultimately looking for. Steve James Centers for Disea...

Is it possible to automatically clear & establish variables in the Matlab workspace?
I have a system that consists of a gui that continuously reads in values from the user, and passes them to a c-mex s-function that specifies a block within a Simulink model. The variable whose value is being set by the user, ‘Rating’, currently needs to be initially defined within the Matlab workspace manually (by setting Rating = some value at the Matlab command prompt or by executing an .m-file script containing that line). If I don’t manually establish this value, which is shared between my system components, I get an error message that this variable isn’t defined, when the system begins running. Here’s my problem: I’m at the point in my system development where I’m going to need to run a set of calculations, and then clear all variables to reset the entire system, after which I need to run another set of calculations. I’d like to be able to automatically clear all variables after each set of calculations, and then re-declare and define the Rating variable in the Matlab workspace. I’m going to need to run several dozen consecutive sets of calculations, and if I need to manually execute a script between each set of calculations, this is going to be clumsy (particularly since my experiments involve human subjects, and it will be disruptive for me to have to come in and reset this variable between experiments). Is there any way for me to call the 2-line m-file script from within my gui m-file or my c-mex s-function code, or otherwise *automatically* clear all variable...

Re: Easier Way to do Proc Means without Var labels?
On Mon, 13 Jun 2005, Xu Libin wrote: > SAS-Lers, > > Can anyone there tell me if there is an easier way to do proc means > which does not produce variable labels? The help file says that proc > template will take care of this. That will take several steps. Can I use > something like nolabel in the proc means statement to get rid of the > variable labels? > Libin, The NOlabel option is one efficient way: OPTIONS NOlabel; PROC MEANS data=mx3 ; VAR v31 ; run ; OPTIONS label; Robin High Univ. of Oregon ...

Re: Change the label on fly, any better way? #3 1545921
Ya - SQL "into :" will allow you to load a macro with values from your data for use as labels. There is also an example of how Proc Transpose can assign labels from data. My other thought is to use the vlabel and vname function groups to test your variable names and labels, but they won't help you assign them. http://xrl.us/egy9 good luck Paul Choate DDS Data Extraction (916) 654-2160 -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Ya Huang Sent: Wednesday, December 22, 2004 11:27 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Change the label on fly, any better way? Hi There, The follwing code change the variable a's label based on its value. I wonder if there is a better way to do it. I've got a feeling, the two data step in the macro can be combined. I tried to use %sysfunc and symget, but failed. Thanks Ya -------------- data xx; a='breakfast'; delta=23; output; a='lunch'; delta=56; output; run; %macro doit(a=); data _null_; set xx; if a="&a"; call symput('alb',a); run; data yy; set xx; if a="&a"; label a="&alb"; run; proc print label; run; %mend; %doit(a=breakfast); %doit(a=lunch); ...

Is there a way to keep persistent variable values in Matlab (or s-function) workspace?
I have a c-mex s-function that defines a block in my Simulink model. Each time I run my c-mex s-function code (via my .mexw32 file that executes), a set of calculations is performed. I need to run this system numerous, discrete times, with each system-run performing a different set of calculations. I’m hoping to use a Dwork vector variable named Dwork_TestSet[0] to determine which set of calculations to perform (and, at the end of each set of calculations, this vector variable is incremented, so that the next time the system runs, the *next* set of calculations will execute). However, my problem is that every time the system stops running, and then is restarted, the Dwork_TestSet[0] variable always gets reset to 0, thus preventing me from using this as a persistent variable between calculation sets. I’ve attempted the following solutions: ~ eliminate the initialization statement for this variable within mdlStart() ~ eliminate the (alternative) initialization statement for this variable within mdlInitializeConditions() ~ try to manually reset the variable to its incremented value within the Matlab workspace (this returns an error message: “Error: Unbalanced or unexpected parenthesis or bracket.” – apparently, the Dwork vector isn’t defined outside of the c-mex s-function code) The result: none of the above attempts work; the Dwork_TestSet[0] variable is always reset to 0 when each new set of calculations is started. Is it going to be possible for me to allow...

soft decoding of conv. codes using vitdec matlab func. #2
Hello, Isnt 'unquant' and 'soft' options essentially same?..in both case vitdec takes in "real numbers" as input (ok they are "mapped" in case o 'soft' option)..so can we not use 'unquant' option to carry out sof decoding?...my preliminary results show that 'unquant' option give me 2- db gain over hard decoding... any one having insight please let me know. thanks >Hello, > Isnt 'unquant' and 'soft' options essentially same?..in both cases >vitdec takes in "real numbers" as input (ok they are "mapped" in case of >'soft' option)..so can we not use 'unquant' option to carry out soft >decoding?...my preliminary results show that 'unquant' option give m 2-3 >db gain over hard decoding... >any one having insight please let me know. >thanks > > %%% Yes , u can use 'unquant' as soft decoding. try to implement for k=3 i.e [5 7] and BPSK and at roughly 4 dB u should get BER of 10^-3. Chintan ...

A novel way to run Matlab on an Intel Mac: use a Linux VM!
Yes, yes, I know, the Mathworks has finally released a private beta of MATLAB for the Intel Mac. I've downloaded it, and it's pretty nice, but it's not perfect---it has at least one showstopper bug for me right now (that they already know about). And since I develop software that needs to run on multiple platforms, I actually have to keep Windows and Linux versions of MATLAB going anyway. So I have come up with an approach to running Linux Matlab on the Mac that works so seamlessly that, frankly, I don't think I'll miss the Intel Mac MATLAB much, and I am content to wait until its final release in 2007. What I've done is create a minimalist Linux VM using Parallels Desktop. It doesn't have a desktop GUI installed (Gnome/KDE), and I really never use the console. That's because I only access this VM using ssh and X Windows. I installed just enough of the X libraries to get xterm and MATLAB working. Then, I exported my Mac's /Users directory via NFS to the Linux VM, so my Mac home directory also serves as my Linux home directory. I've insured that NFS will only accept connections from the internal virtual networks, not the external network. There are a couple of other tricks here (matching UIDs and GIDs, static IPs, manual /etc/hosts entries, print service, etc.) to get this working smoothly, but the end result is that it's almost like I'm running Linux Matlab natively on the Mac! I can do all my editing, source control, etc. o...

Is there a way to add constraints to Matlab's non-linear least square solver?
Hi there, I am solving a non-linear least squares problem(constrained and bounded) and I hope to use the Matlab's non-linear least squares solver: help lsqnonlin LSQNONLIN solves non-linear least squares problems. But it doesn't allow specifying constraints(equality and inequality), does anybody know a way to get around this? I know there are many tricks in optimization and there are many experts on these boards, please shed some lights on me. Thank you! Hi, as you can see in the LS section of http://plato.asu.edu/guide.html there are various Matlab codes addressing only some of the aspects of your problem. For the most general problem you better use a full NLP solver. You find them in the Constrained Optimization/NLP section and at least two are in Matlab: SOLNP and SQPLab. Others have a Matlab interface such as IPOPT. On Jul 23, 8:01 pm, "Luna Laurent" <luna_laur...@yahoo.com> wrote: > Hi there, > > I am solving a non-linear least squares problem(constrained and bounded) and > I hope to use the Matlab's non-linear least squares solver: > > help lsqnonlin > LSQNONLIN solves non-linear least squares problems. > > But it doesn't allow specifying constraints(equality and inequality), does > anybody know a way to get around this? > > I know there are many tricks in optimization and there are many experts on > these boards, please shed some lights on me. Thank you! ...

SYS$SPECIFIC and SYS$COMMON not enough?
Basically, the idea is that stuff specific to a given node will be in its SYS$SPECIFIC directory and stuff common to all nodes (satellites or not) booting from the same system disk will be in SYS$COMMON. A good idea as far as it goes, but does it go far enough? In particular, there are two additional categories, which I'll give the obvious names SYS$CLUSTER and SYS$WORLD. SYS$CLUSTER would include stuff common to all nodes in a cluster, i.e. would differ from SYS$COMMON if there is more than one system disk in the cluster. The obvious place for this stuff is somewhere which is not on ANY system disk. SYS$MANAGER:SYLOGICALS.TEMPLATE provides (at least in newer versions of VMS, starting with 7.2 I believe) a list of at least the most common candidates among VMS system files. Add to this procedures to mount disks in a cluster, SYLOGIN.COM etc. (Obviously, I'm thinking of a cluster where as much as possible is shared.) SYS$WORLD, on the other hand, would include stuff which is common to ALL VMS system disks in the world, e.g. the executables used by VMS itself. Obviously, this should be on EVERY system disk. Put another way, the current SYS$COMMON is a mixture of stuff common to all nodes which boot from that disk, stuff common to all VMS systems in the world and, if the stuff is not located somewhere else (pointed to by logicals in the case of VMS system files), stuff common to all nodes in the cluster (perhaps duplicated on more than one system...

Have It Our Way
I'm shopping around for a Athon 2000 system, so I see this: http://www.staples.com/Catalog/Browse/SKU.asp?BCFlag=False&PageType=1&SKU=514512 There's a Staples down the block from me, so it would be real convenience AND the price is just about as low as all the /bargain retailers/ in the area. HOWEVER -- it does include /Windos XP/ -- so I wrote to their customer service department and asked if I could substitute RedHat Workstation ( which they sell ) Linux instead. What do you think they'll say??? Monkey Planet <planetof@theapes.zoo> writes: > I'm shopping around for a Athon 2000 system, so I see this: > > http://www.staples.com/Catalog/Browse/SKU.asp?BCFlag=False&PageType=1&SKU=514512 > > There's a Staples down the block from me, so it would be real convenience > AND the price is just about as low as all the /bargain retailers/ in the > area. > > HOWEVER -- it does include /Windos XP/ -- so I wrote to their customer > service department and asked if I could substitute RedHat Workstation ( > which they sell ) Linux instead. > > What do you think they'll say??? Questions? Call 1-800-3STAPLE On Fri, 16 Jan 2004 17:20:55 GMT, Monkey Planet wrote: > > I'm shopping around for a Athon 2000 system, so I see this: > > http://www.staples.com/Catalog/Browse/SKU.asp?BCFlag=False&PageType=1&SKU=514512 > > There's a Staples down the block from me, so it would be...

Web resources about - Is there a way to clear axes labels? - comp.soft-sys.matlab

Label - Wikipedia, the free encyclopedia
A label is a piece of paper , polymer , cloth , metal , or other material affixed to a container or article, on which is printed a legend, information ...

Woolworths makes Homebrand homeless in private label shift
Woolworths is culling Homebrand in favour of 'Essentials' to fight perceptions customers can get better quality at Aldi.

Woolworths makes Homebrand homeless in private label shift
Woolworths is culling Homebrand in favour of 'Essentials' to fight perceptions customers can get better quality at Aldi.

Woolworths makes Homebrand homeless in private label shift
Woolworths is culling Homebrand in favour of 'Essentials' to fight perceptions customers can get better quality at Aldi.


Woolworths makes Homebrand homeless in private label shift
Woolworths is culling Homebrand in favour of 'Essentials' to fight perceptions customers can get better quality at Aldi.

Josh Rosenthal of Tompkins Square label released memoir, going on book tour; guitarist Harry Taussig ...
The Brooklyn stop on the tour also features Kid Millions' Wax Lions and Michael Daves.

General Mills Will Label GMO Products; Calls For National Labeling Standard
Earlier this week, the Senate narrowly shot down a piece of legislation that would have created a voluntary national standard for labeling food ...

An Incredible Exercise in Diplomacy: Talking Label Management with Sarah Moody of Hardly Art Records
VideoHardly Art Staff - Photo by Sarah Cass In 2007, Sub Pop Records the legendary Seattle-based label responsible for innumerable historic indie ...

Looking for calorie labels on menus? Not until 2017
Looking for calorie labels on menus?

Resources last updated: 3/30/2016 1:18:25 PM