Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Hello,
I'm working in Mathcad Prime 10
I am struggling to get a solve block working. I'm attempting to calculate a grid convergence index based on a published guidance document, and it requires an iterative approach which I thought could be executed by a solve block. I'm receiving various errors (see one in the image below) depending on what I try. I have attached my current workbook. Thanks for any help you can provide.
Solved! Go to Solution.
1. q() is a functon and should be defined outside solve block.
2. ln() is a function and requres (postive) arguement.
3. "Parameterize" solve block with guess value to get p.
4. Use function q(p) to get q.
Prime 10 file attached.
Change the all occurrences of
q(p)
to
q
and see how that helps
Success!
Luc
Thanks for the suggestion. I've made that change and there's still an error, but the error message is different. It used to say "Initial guess must consist of numbers and matrices" and it now says "This value must be a scalar or a matrix."
1. q() is a functon and should be defined outside solve block.
2. ln() is a function and requres (postive) arguement.
3. "Parameterize" solve block with guess value to get p.
4. Use function q(p) to get q.
Prime 10 file attached.
Thank you so much! That was so helpful.
The problem is that you have in implicit multiplication after "ln". Even if the absolute value bars in manual writing may replace the argument parenthesis you must always use parenthesis when using functions in Prime:
But defining q(p) as a function is probably the better solution anyway. If you do so, you could also use the "root" function in one of its two flavors:
You could also use the symbolic solver:
Check:
Success!
Luc