Skip to main content
1-Visitor
September 4, 2021
Solved

Solve block and two, different length, data arrays

  • September 4, 2021
  • 1 reply
  • 2923 views

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 🙂

Best answer by terryhendicott

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

1 reply

21-Topaz II
September 6, 2021

No need for a solve block

Capture.JPG

1-Visitor
September 6, 2021

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.

21-Topaz II
September 6, 2021

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