The function did not work when you add dead time because it seems as though the code was trying to add a sequence to each element of the Q_dead matrix.
I fixed this by configuring the Q_dead matrix to accept complex numbers and then converting each element of the calculation for Q_dead to a normal value before inserting it into the matrix.
The function did not work when you add dead time because it seems as though the code was trying to add a sequence to each element of the Q_dead matrix. I fixed this by configuring the Q_dead matrix to accept complex numbers and then converting each element of the calculation for Q_dead to a normal value before inserting it into the matrix.