Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

question on electrical circuit

3 visualizzazioni (ultimi 30 giorni)
PRASANTH R
PRASANTH R il 28 Dic 2020
Chiuso: Sabin il 20 Giu 2025
function out = voltage(V,R)
%A*out = y
%out[A;B;C] 3X1 Mmatrix
A = zeros(3,3);
y = zeros(3,1);
% FROM THE FIRST EQ
A(1,1) = R(2)*R(7)+R(1)*R(2)+R(1)*R(7);
A(1,2) = R(1)*R(2);
A(1,3) = 0;
y(1,1) = V*R(2)*R(7);
% FROM THE SECOND EQ
A(2,1) = -R(3)*R(8)*R(4);
A(2,2) = R(7)*R(8)*R(4)+R(3)*R(8)*R(4)+R(3)*R(7)*R(4)+R(3)*R(7)*R(8);
A(2,3) = -R(3)*R(7)*R(4);
y(2,1) = V*R(7)*R(8)*R(4);
% FROM THE THIRD EQ
A(3,1) = 0;
A(3,2) = -R(5)*R(6);
A(3,3) = R(8)*R(6)+R(5)*R(6)+R(5)*R(8);
y(3,1) = V*R(8)*R(6);
% NOW WE DIVIDE TO FIND THE SOLUTION
out = pinv(A)*y;
end
  3 Commenti
Walter Roberson
Walter Roberson il 31 Dic 2020
Your A is not singular, so you could use A\y instead of pinv(A)*y
PRASANTH R
PRASANTH R il 31 Dic 2020
thanks brother

Risposte (0)

Questa domanda è chiusa.

Prodotti


Release

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by