how to write this code ?

Answers (2)

Looks like the Kirchhoff's voltage law.
Are you looking for something like this?
syms Vab Vbc Vca
eqn = Vab + Vbc + Vca == 0
S = solve(eqn, Vca)

5 Comments

@Sam Chak yes.this what i'm looking for
@Sam Chak I want an initial code that deduces the third voltage after reading from the sensors
Are you looking for something like the user input?
prompt1 = input('What is the value of Vab? ');
Vab = prompt1;
prompt2 = input('What is the value of Vbc? ');
Vbc = prompt2;
Vca = - (Vab + Vbc)
@Sam Chak Thank you very much ..Mr. Sam
You are welcome. Take your time to explore MATLAB.

Sign in to comment.

What is the code supposed to do with the three V-values ?
You can write
syms V_ab V_bc V_ca
eqn = V_ab + V_bc + V_ca == 0
result = solve(eqn,V_ca)
And now ?

1 Comment

@Torsten I want an initial code that deduces the third voltage after reading from the sensors

Sign in to comment.

Asked:

on 9 Apr 2022

Commented:

on 9 Apr 2022

Community Treasure Hunt

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

Start Hunting!