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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Node analysis matrices with input array

MarioH
3-Newcomer

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

Try please

V.png

This would not help with the desired calculation

Werner_E
25-Diamond I
(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.

Werner_E_0-1596457673901.png

 

 

 

MC15 worksheet attached

 

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

https://community.ptc.com/t5/PTC-Mathcad/Calculating-matrices-with-a-a-set-of-numbers-in-an-array/m-p/644929

-MFra-
21-Topaz II
(To:MarioH)

Hi,

you could simply do the following:

MARIOH answer.jpg

MarioH
3-Newcomer
(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

-MFra-
21-Topaz II
(To:MarioH)

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

Sensitivity.jpg

sensitivity example.jpg

Announcements

Top Tags