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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

custom CreateMesh function of vector argument

ifomenko
15-Moonstone

custom CreateMesh function of vector argument

I`m trying to create function CreateMesh.f which works with vector argument but I met some problems

CreateMesh for vector argument.png

EDIT: I found the way, but I don`t understand why the first one doesn`t work

Workaround.png

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:ifomenko)

Mathcad/muPad does not know that your {x} should be a two-element vector unless you provide a two-element vector (x,y) instead of a single variable name. Thats why your first attempt fails and the second succeeds.

Furthermore "CreateMesh" is a numeric command only - its not known by the symbolic processor.

Your second approach does not use symbolics and to me its much more clearer and straight forward anyway. I would prefer it even if the first one would work 😉

View solution in original post

4 REPLIES 4
Werner_E
25-Diamond I
(To:ifomenko)

Mathcad/muPad does not know that your {x} should be a two-element vector unless you provide a two-element vector (x,y) instead of a single variable name. Thats why your first attempt fails and the second succeeds.

Furthermore "CreateMesh" is a numeric command only - its not known by the symbolic processor.

Your second approach does not use symbolics and to me its much more clearer and straight forward anyway. I would prefer it even if the first one would work 😉

Werner_E
25-Diamond I
(To:Werner_E)

BTW, here is a modification of your first approach using symbolics, but as already written, I still would prefer your second approach.

Werner_E_0-1581879261246.png

 

ifomenko
15-Moonstone
(To:Werner_E)

Many thanks, I understood

Werner_E
25-Diamond I
(To:ifomenko)

Here is an even shorter variant of your second approach:

Werner_E_0-1581885833938.png

 

Announcements

Top Tags