comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Adding or deduct values in a ARRAY
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Adding or deduct values in a ARRAY [message #52161 is a reply to message #52160] Fri, 19 January 2007 05:19 Go to previous message
Wox is currently offline  Wox
Messages: 184
Registered: August 2006
Senior Member
On 19 Jan 2007 05:08:03 -0800, "Erik" <janssen.e@gmail.com> wrote:

> Hi Folks,
>
> I have a (assumable) simple question. I have an array like this:
>
> ARR1 FLOAT = Array[3, 4]
> 93.0000 118.000 0.000000
> 93.0000 73.0000 0.000000
> 151.000 73.0000 0.000000
> 151.000 118.000 0.000000
>
> The array contain's four [x,y,z] coordinates. Now I want all the X
> coordinates lowered by 10. The result should be:
>
> ARR1 FLOAT = Array[3, 4]
> 83.0000 118.000 0.000000
> 83.0000 73.0000 0.000000
> 141.000 73.0000 0.000000
> 141.000 118.000 0.000000
>
> I've tried ARR1-10 but then all the values are deducted by 10.
> When I try ARR1[*,*,*] - 10, then I've get an array with all the X/Y/Z
> values lowered.
> When I try ARR1[*,0,0] - 10, then I've get an array with with only 3
> dimensions float[3]
>
>
> How can I select a specific dimension to edit so I can get the result
> which is described above.
>
> Thanks in advance!!
>
> Erik


arr1[0,*]-=10
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Adding or deduct values in a ARRAY
Next Topic: Avoiding loop stats

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:30:00 PDT 2025

Total time taken to generate the page: 0.00390 seconds