Trying to Solve for a Matrix with sinusoidal inputs
Show older comments
I'm attempting to solve for the Mtse (a matrix) but I can't do so because Mti is a culmination of all the results from the sinusoidal functions in matrix Mte.
How do I solve each for each input of 't' iteratively.
Apologies in advance, I am very inept with Matlab.
%Admittance for Walls
clear
%Mti=Mrsi*Mc*Mi*Mrse*Mte
%Values for Matrices
%Mrsi
Rsihor=0.13;
% Mc
C11=-1.566+3.298j;
C12=-0.0478-0.123j;
C21=98.61-38.24j;
C22=-1.566+3.298j;
%Mi
I11=0.166+2.124j;
I12=-3.567-3.137j;
I21=0.769-0.874j;
I22=0.166+2.124j;
%Mrse
Rse=0.04;
%Mte --> t=0:1:24
t=0:1:24;
Te=-3.3*cos((pi*t)/12)+28.7;
qe=-3.3*cos((pi*t)/12)+300;
%Matrices
Mrsi=[1,Rsihor;0,1];
Mc=[C11,C12;C21,C22];
Mi=[I11,I12;I21,C22];
Mrse=[1,Rse;0,1];
Mte=[Te;qe];
A=Mrsi*Mc*Mi;
%Solving for Mti=[Ti;qi]
Mti=Mrsi*Mc*Mi*Mrse*Mte;
%Solving for Mtse=[Tse;qe]
Mtse=Mti.*inv(A);
Answers (1)
KSSV
on 11 Apr 2020
Are you looking for something like this?
%Admittance for Walls
clear
%Mti=Mrsi*Mc*Mi*Mrse*Mte
%Values for Matrices
%Mrsi
Rsihor=0.13;
% Mc
C11=-1.566+3.298j;
C12=-0.0478-0.123j;
C21=98.61-38.24j;
C22=-1.566+3.298j;
%Mi
I11=0.166+2.124j;
I12=-3.567-3.137j;
I21=0.769-0.874j;
I22=0.166+2.124j;
%Mrse
Rse=0.04;
%Mte --> t=0:1:24
t=0:1:24;
Te=-3.3*cos((pi*t)/12)+28.7;
qe=-3.3*cos((pi*t)/12)+300;
%Matrices
Mrsi=[1,Rsihor;0,1];
Mc=[C11,C12;C21,C22];
Mi=[I11,I12;I21,C22];
Mrse=[1,Rse;0,1];
Mte=[Te;qe];
A=Mrsi*Mc*Mi;
%Solving for Mti=[Ti;qi]
N = length(Te) ;
Mtse = zeros(2,2,N) ;
for i = 1:N
%Solving for Mtse=[Tse;qe]
Mti=Mrsi*Mc*Mi*Mrse*[Te(i) ; qe(i)];
Mtse(:,:,i)=Mti.*inv(A);
end
Categories
Find more on Mathematics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!