Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
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
Try please
This would not help with the desired calculation
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
Hi,
you could simply do the following:
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
in this regard there is a bit of theory to apply, if you want to do things right: