I want to write a function that calculate the voltage for three junctions A,B and C in the picture below if we know the voltage of V. (G=0V). Did anyone write it before?

5 vues (au cours des 30 derniers jours)
  1 commentaire
DGM
DGM le 29 Nov 2021
Modifié(e) : DGM le 29 Nov 2021
Express the currents entering and leaving those three nodes as functions of the node voltages V,Va,Vb,Vc. Expand and rearrange to form a simple linear system of equations. Solve.

Connectez-vous pour commenter.

Réponse acceptée

Milad Mehrnia
Milad Mehrnia le 30 Nov 2021
function ans = voltage(V,R)
E1 = [R(2)*R(7)+R(1)*R(2)+R(1)*R(7) -R(1)*R(2) 0]
E2 = [-R(3)*R(8)*R(4) R(4)*R(8)*R(7)+R(3)*R(8)*R(4)+R(3)*R(7)*R(4)+R(3)*R(7)*R(8) -R(3)*R(7)*R(4)];
E3 = [0 -R(5)*R(6) R(8)*R(6)+R(5)*R(6)+R(5)*R(8)];
E = [E1;E2;E3];
b = V.*[R(2)*R(7);R(4)*R(8)*R(7);R(8)*R(6)];
ans = E\b;
end
  4 commentaires
Benjamin Asakov
Benjamin Asakov le 30 Nov 2021
Thank you both guys. I really don’t know how to appreciate it.
Didn’t expect to have the answer less than a day. And not just one but three answers.
Really thank you

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Mathematics dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by