Hi Adel, Thank you again for responding to me! I tried this matrix method because I had calculated the transmission function and it matched what was calculated by smatrix.transmission. So I thought it was possible to use it this way. I tried to escape from the method of virtual leads, but it is not possible.
Best, Gabriel