Any help for converting from s-matrix to z-matrix

plz can any one help me, i want to make a code to convert from z-matrix to s-matrix and vice versa as below :
[z]= {[u]-[s]}inverse * {[u]+[s]}
[s]= {[z]-[u]} * {[z]+[u]}inverse
s = s-matrix z = normalized impedance matrix u = identity matrix
appreciating your kind help because it's more than urgent for me

回答(2 个)

I don't know the context, but the code should be simple enough:
% Assume you have S and it is a square matrix
% Create U of the same size
U = eye(length(S));
Z = inv(U-S) * (U+S);
% Assume you have Z and it is a square matrix
% Create U of the same size
U = eye(length(Z));
S = (Z-U) * inv(Z+U);

类别

帮助中心File Exchange 中查找有关 Neuroimaging 的更多信息

提问:

2011-7-21

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by