Q1: How to delete a column from a 2D wave? Q2: Can I print "on" a panel?

Q1: I have a 2D wave: raw[14150] [851]. I want to get rid of the first column: raw[p][0] of the wave so the new wave becomes raw[14150][850]. I have a feeling it's a pretty simple command but unfortunately I haven't been able to figure this out. Kindly advise. Thanks!  

 

Q2: I have a built a panel which performs a variety of operations via clicking buttons. What I want to do next is to execute a print command such that when a button is clicked to load a file, a sentence prints "on" the panel (i.e. in a clear space on the panel's surface) saying "file xyz is loaded". But I have no idea how to do this. Please help. Thanks! 

For Q1: if raw is 14150 rows and 851 columns,

Make/O/N=(14150,850) newRaw // one column less
newRaw[][] = raw[p][q+1]

 

Hi,

To delete a column, you can use the deletepoints command with the/m flag to designate the dimension, 1 for columns in your case.  For example if you wave is "Fred"

deletepoints /m=1 0,1,Fred would delete the first column of Fred.

 

To your second question: I would create a title Box and either reference a string variable.  To hide the box just set the string variable to "".  Later when you want to show a message, just change the value of the string variable.

 

Andy

Q1:  The simple way in IP8:

MatrixOP/O newWave=subRange(raw,0,14149,1,850)

Also, since you are only removing one column you can also use Duplicate/R=[0,14149][1,850] raw,newWave

Q2.  There are different ways to print text on a panel.  The first decision you need to make is if you want to keep all the information and be able to scroll through it.  If so, I recommend embedding a notebook in the panel and adding text to it as you go.  This is pretty simple as in, e.g.,:

NewNotebook /F=1 /N=notebookName /W=(57,277,748,500) /HOST=Panel0

Look for the notebook command for adding text.

If you do not want to keep all the information you can use a SetVariable control that is set to some internal text.  For example:

SetVariable setvar0,pos={48.00,68.00},size={308.00,18.00},bodyWidth=250,title="Message:"
SetVariable setvar0,fSize=12,value= _STR:"This is a test"

To execute the "printing" you will overwrite the content of the control:

SetVariable setvar0 win=panel0,value= _STR:"This is New Text"

I hope this helps,

 

AG