Starting with version 23.08, reading and writing parameters for double arrays and double matrices has been simplified.
When reading an array or a matrix, a python list (1D or 2D) is returned:
from aesim.simba import DesignExamples
design = DesignExamples.Interleaved_buck()
L1 = design.Circuit.GetDeviceByName("L1")
L1.Inductance = "[100u -80u ; -80u 100u]" # It is possible to set the value with a string
l = L1.Inductance; # Get Python 2D Array
print("l(1): " + str(l))
l[1][0] = -90E-6;
l[0][1] = -90E-6;
L1.Inductance = l; # Second option to set matrix parameter (python array)
print("l(2): " + str(L1.Inductance))
L1.Inductance = [[100E-6, -90E-6], [-90E-6, 100E-6]] # That also works
print("l(3): " + str(L1.Inductance))
L1.Inductance[0][0] = 666 # WARNING! This will NOT work because this will not change the L1.Inductance parameter
print("l(4): " + str(L1.Inductance))
Starting with version 23.08, reading and writing parameters for double arrays and double matrices has been simplified.
When reading an array or a matrix, a python list (1D or 2D) is returned:
Output: