Skip to main content
1-Visitor
Solved

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 🙂

terryhendicott
21-Topaz II

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

6 replies

terryhendicott
21-Topaz II

No need for a solve block

Capture.JPG

Translate
1-Visitor

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.

Translate
terryhendicott
21-Topaz II

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

Translate