cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with creating a function.

lvl107
18-Opal

Need help with creating a function.

Hello, Everyone.

Create a function .PNG

Need help with creating a function L_(X,Y) with output as the above. (green highlight)

Thanks in advance for your time and help.

      Regards. Loi.

Message was edited by: Loi Le

1 ACCEPTED SOLUTION

Accepted Solutions
StuartBruff
22-Sapphire II
(To:lvl107)

Loi Le wrote:

Hello, Everyone.

Need help with creating a function L_(X,Y) with output as the above. (green highlight)

Hi Loi,

The problem with your function L_ is that it modifies Yj when k=1, so the new value gets propagated into the k=2 iteration.  There are a couple of ways round it: assign Yj to a new variable at the start of each i,j loop or use your existing function L as a local function.

Stuart

View solution in original post

3 REPLIES 3
StuartBruff
22-Sapphire II
(To:lvl107)

Loi Le wrote:

Hello, Everyone.

Need help with creating a function L_(X,Y) with output as the above. (green highlight)

Hi Loi,

The problem with your function L_ is that it modifies Yj when k=1, so the new value gets propagated into the k=2 iteration.  There are a couple of ways round it: assign Yj to a new variable at the start of each i,j loop or use your existing function L as a local function.

Stuart

View solution in original post

  I got it. . Many, many thanks for time and help, Stuart.

     Regards. Loi.

StuartBruff
22-Sapphire II
(To:lvl107)

No worries, Loi.  I like to keep an eye on your posts and look at the interesting results you get.

Stuart

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."