cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Solve block and two, different length, data arrays

YO_10021171
2-Guest

Solve block and two, different length, data arrays

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 🙂

1 ACCEPTED SOLUTION

Accepted Solutions

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.

Capture.JPG

View solution in original post

6 REPLIES 6

No need for a solve block

Capture.JPG

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.

Capture.JPG

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.)

  • Your example { (V+R+I)^4 =3 } will choke Mathcad, the units won't balance.

             Fred_Kohlhepp_0-1630928556392.png

 

  • Do you have an example of a real world situation where Ohm's Law doesn't hold?
LucMeekes
23-Emerald III
(To:YO_10021171)

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):

LucMeekes_0-1630930104557.png

But you could also use the root function...

Now you can use the function Sol(V,I) to find each of your R-values:

LucMeekes_1-1630930237910.png

Success!
Luc

 

I didn't know you could define a function that way, thanks a lot this is exactly what I wanted

Top Tags