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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

3-Visitor

## Node analysis matrices with input array

Hello,

I tried to do a node analysis with a resistor matrix. The input of the voltage matrix should be variable, therefor I introduced an array with voltages. After the solver I get an error "This value must be scalar or a matrix.". What must I do to get the rigth result, doing the calculation without array works.

Thanks

6 REPLIES 6
24-Ruby IV
(To:MarioH)

24-Ruby V
(To:ValeryOchkov)

This would not help with the desired calculation

24-Ruby V
(To:MarioH)

Your function M.Unom(V.bat) makes use of V.in and V.in is a range (not a vector). The way you use it it has to be a single scalar.

Always setup all your calculations for single scalar values and make them functions in the variable you'd like to vary later.

After you have defined all your calculations, you define a vector (not a range) for all those variable values and call your function with this range as argument. Don't forget to vectorize (the arrow over the expression) that function call.

Because of the vectorization used it seems to be necessary to define a separate auxiliary function to get access to the n-th element of the result vector of the solve block function. As an alternative you may also turn U.ADC into a function.

MC15 worksheet attached

BTW, there is still an open question of yours which you did not came back to

21-Topaz II
(To:MarioH)

Hi,

you could simply do the following:

3-Visitor
(To:-MFra-)

Hello,

thank you it works, great 🙂

If I now want to put also Rmin and Rmax (different R matrices) values to get the ADCmin and ADCmax values

tolerances from my nominal values, is there a simple chance to do this in one calculation

or has this to be done in two. How to combine if I write the calculation three times for min nom and max.

Thank you

21-Topaz II
(To:MarioH)

in this regard there is a bit of theory to apply, if you want to do things right:

Announcements
Top Tags