I`m trying to create function CreateMesh.f which works with vector argument but I met some problems
EDIT: I found the way, but I don`t understand why the first one doesn`t work
Solved! Go to Solution.
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 😉
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.
Many thanks, I understood
Here is an even shorter variant of your second approach: