# vrf math operation in 2D array

Question asked by VRFuser on Oct 17, 2006
Use the following 2 lines in a formula box with a as the input:
Â
a[*,0]=a[*,0]/1e6;
a
Â
----
Divide the first column by 1e6, then output the entire array as the result.
Â
Hope this helps,
Â
Mike
Â
***********************************************************
Michael N. AsberyÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â  (202)404-3014, DSN 754
US Naval Research LaboratoryÂ Â Â Â Â  fax (202)404-7661
Code 5733.20Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  michael.asbery@nrl.navy.mil
4555 Overlook Ave SW
Washington DC 20375Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
***********************************************************
Â  _____ Â

From: Thomas, Pete (GE Healthcare) [mailto:Peter.Thomas@med.ge.com]
Sent: Tuesday, October 17, 2006 3:17 PM
To: VRF
Subject: [vrf] math operation in 2D array
Â
Hello all,
Â Â Â Â Â Â Â Â Â Â Â  Â Is there a command that Iâ€™m missing that I can use to only perform on a single column in a 2D array and still keep the 2D array intact.Â  For example I have a 2D array with 140 rows and 2 columns,Â  I would like to only change the 1st column and divide it by 1E6.Â  When using the command ary[*,0]/1E6 the result is a 1D array.Â  I would like to keep the 2nd column of data intact.Â  Was wondering is there is a simple command vs. re-creating the 2D array.
Â
Pete Thomas
Senior Test Engineer
MR Test Engineering
â€¢ Phone: 262.521.6758
â€¢ Mobile: 262.993.0154
â€¢ Pager: NONE
GE Healthcare
Â

---
You are currently subscribed to vrf as: michael.asbery@nrl.navy.mil
To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to

Search the "unofficial vrf archive" at "www.oswegosw.com/vrf_archive/".

---

To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to

Search the "unofficial vrf archive" at "www.oswegosw.com/vrf_archive/".