I am using MATHCAD7 in an automatic calibration station. The station collects data and writes to a file. The MATHCAD worksheet is called by the station and a least-squared fit in a solve block is done.
Problem: If the solve block is not successful, how do I notify the station host. What happens now is that the guess values get sent without any notification of the error: not good.
You'll need to define an intermediate diagnostic variable, v, as I've illustrated in the attached Mathcad 7 worksheet. Play around with the value R. If R=1, there is no solution to the system and v remains a string variable. If R=2, there are solutions and v becomes an (x,y) vector containing one solution.