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

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

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 😉

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

Here is an even shorter variant of your second approach:

Werner_E_0-1581885833938.png

 

Top Tags