Mathcad function definition cross reference

377 Views Asked by At

Hi I have a problem with the definition of functions. I have a function A that references to function B which uses function A from a previous iteration.

here's my code

thanks for helping me

1

There are 1 best solutions below

0
On

Unfortunately, Mathcad doesn't allow mutual function calls. One way round the problem is to define a generic function that encompasses all of your intended behaviour and then use an extra input parameter to select which part of the function you want to evaluate. See image below.

I note that your first function θa is recursive for t >= 5 s. You also have a variable θa in the second function ca and a variable hnet in the fourth function Δa.t

enter image description here