Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Please check the sheet attached.
If I use the max-function on a matrix filled with strings, it returns a result.
If I use the same function on a column of the matrix, it gives an error ("These values must all be of one type")
If I assign the column of the matrix to a new variable, but don't evaluate and then use the max function on the new variable it errors
If I assign the column to a new variable and evaluate, then use the max function, it gives a result
If I write a little program and search the max of a column with different values, it errors but in the same program, if I search the max of a column (transpose of a row in this case) with identical values, it doesn't error.
Can anybody explain this inconsistent behaviour?
Solved! Go to Solution.
This is really a crazy bug. A simple double transpose of the matrix does the job, too:
So a suitable workaround function could be
Its a pity that we can't create user functions with a variable number of arguments.
Nothing a little brute force can't cure:
> Can anybody explain this inconsistent behaviour?
No. I would call it a bug and you may report it to PTC.
But you should note that PTC is not really interested in bug reports and so they only offer to do so for paying customers under maintenance - probably just to make them feel better.
I can imagine they're not to eager to put time and resources in fixing bugs in Mathcad 15 while they have all that work laying around making Prime look like something decent...
Here is a workaround for this bug. A new function max for 1 single argument, so you may want to rename it max1 - otherwise you can't use max with more than 1 arguments.
This is really a crazy bug. A simple double transpose of the matrix does the job, too:
So a suitable workaround function could be
Its a pity that we can't create user functions with a variable number of arguments.
I think I'll go for this solution, as silly as it looks...