I'm attaching a Prime 1.0 worksheet that demonstrates a problem I'm having. I'm defining a function with a program which tests for a zero input. This works fine when you invoke the function with a constant or a simple variable of zero, but not when the argument is a range variable including a zero value. Am I doing something wrong, or is there a workaround to this?
Have a look at the attached if you can open it. There does seem to be a problem when units are involved.
Just incase you can't open the above file I save included an image for you to follow. Sorry, my Mathcad Prime 1.0 is off at the moment.
If I vectorize my call to H(f) like you've done it works fine too, even with units. Thank you, Mike! Are you with PTC? Can I consider that this little insect has been reported?
If I vectorize my call to H(f) like you've done it works fine too, even with units. Thank you, Mike!
No problem at all. It works for me with units, but when I see a problem I always strip the units away and start from scratch.
Are you with PTC?
No I'm not with PTC
Can I consider that this little insect has been reported?
It's actually not a bug. The way to created your range requires the Vectorize function.
I didn't recall that it did either. In fact, I've done similar things in Prime without having to vectorize. My general philosophy has always been "if it doesn't work, try vectorizing", which I didn't follow this time, alas.
I do think Prime is not quite up to snuff yet. I've seen a number of unexplainable errors, which disappear if you delete part of the equation and then re-enter the identical thing, for example. It's so nice in other ways I'm sticking with it, but it's been really difficult this morning.
Mike's Mathcad 15 example works the same in Mathcad Prime as well.
I was looking at the problem with Gerrit's worksheet, and it appears that the issue is that f is defined as 0 in the program, but f is a vector. So you can't test for 0 this way.