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

custom CreateMesh function of vector argument

SOLVED
Alexandrite

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
Highlighted

Re: custom CreateMesh function of vector argument

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
Highlighted

Re: custom CreateMesh function of vector argument

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

Highlighted

Re: custom CreateMesh function of vector argument

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

 

Highlighted

Re: custom CreateMesh function of vector argument

Many thanks, I understood

Highlighted

Re: custom CreateMesh function of vector argument

Here is an even shorter variant of your second approach:

Werner_E_0-1581885833938.png

 

Announcements