Quantcast
Channel: PTC Community: Message List
Viewing all articles
Browse latest Browse all 11560

Re: Substitute in a programm...

$
0
0

WERNER CYRMON wrote:

 

For more than 3 vars I'll tried for Origin to length(v). Wont work.

What function are you talking about? I guess its grad3(), right. First you should not use length(v) but last(v). length(v) will give you the number of elements and will only work correctly if ORIGIN is set to 1. last(v) returns the last index and is ORIGIN aware.

But that obvious appraoch cannot work because of the function call f(v[O,....) which has a fixed numner of arguments and I see no way to change the number of arguments.

There might be a way to do it if the function is written to be a function of just one vector, but thats quite unvomfortable. f(X):=X[0^2 + X[1^2 + X[2^3

 

If I delete the first definition of f(xy,c) in your worksheet, grad3 stops working, so f is globaly definied an nat a parameter of grad3?

No, I don't experience that behaviour. Have you moved around the regions a bit so the (second) function definition is below the call of grad3?

 

Changing the second funtion let's say to cos(x)+y^2+c^3 results in an error ....

Will try that in Prime3

No again. This works pretty well when I do this (grad and grad3). Maybe a problem with the position of the expressions?


Viewing all articles
Browse latest Browse all 11560

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>