Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
I have the following problem. I have a vector containing 5 possible volt values and another vector containing 3 current values. I want to calculate in a solve block what the needed resistance is needed (according to ohm law). I can't figure out what is wrong with my solution.
Thanks 🙂
Solved! Go to Solution.
Hi,
It is possible to generalize the solution by using the symbolic equation solver assigned to a function. Then to use this function to assign the R matrix.
In the case of the equation quoted there are four answers so R is a nested matrix.
Thanks for the reply. This won't work when I don't have the exact equation for R. For example, what if I have (V+R+I)^4=3? I wanted to use a solve block for a more general solution.
Hi,
It is possible to generalize the solution by using the symbolic equation solver assigned to a function. Then to use this function to assign the R matrix.
In the case of the equation quoted there are four answers so R is a nested matrix.
I am a firm believer in the proper use of units; it's one of the reasons Mathcad is such a useful tool for engineers (and others.)
Given that the example is bad in terms of units (See Fred's remark), you don't have a problem at hand with many equations and many unknowns. You only have a single equation with a single unknown. This can be solved with a solve block like this (This is Mathcad Pre version 15, it should look differently in Prime):
But you could also use the root function...
Now you can use the function Sol(V,I) to find each of your R-values:
Success!
Luc
I didn't know you could define a function that way, thanks a lot this is exactly what I wanted