Re: [julia-users] Input to Function Not Replaced if Part of Larger Array

2016-06-02 Thread Kaela Martin
This solution worked. Thanks so much! On Thursday, June 2, 2016 at 12:02:05 PM UTC-7, Yichao Yu wrote: > > On Thu, Jun 2, 2016 at 2:28 PM, Kaela Martin > wrote: > > I have a function that computes the unit vector and replaces the input > with > > that unit vector.

Re: [julia-users] Input to Function Not Replaced if Part of Larger Array

2016-06-02 Thread Yichao Yu
On Thu, Jun 2, 2016 at 3:01 PM, Yichao Yu wrote: > On Thu, Jun 2, 2016 at 2:28 PM, Kaela Martin wrote: >> I have a function that computes the unit vector and replaces the input with >> that unit vector. However, when I have the input as part of a larger

Re: [julia-users] Input to Function Not Replaced if Part of Larger Array

2016-06-02 Thread Yichao Yu
On Thu, Jun 2, 2016 at 2:28 PM, Kaela Martin wrote: > I have a function that computes the unit vector and replaces the input with > that unit vector. However, when I have the input as part of a larger array, > it doesn't replace that part of the array. > > For example, if

[julia-users] Input to Function Not Replaced if Part of Larger Array

2016-06-02 Thread Kaela Martin
I have a function that computes the unit vector and replaces the input with that unit vector. However, when I have the input as part of a larger array, it doesn't replace that part of the array. For example, if the vector I want to make a unit vector is R = [1. 2.; 3. 4.; 5. 6.], the function