Is it possible to define an equation and solve a variable in this equation?
D_PWM, Rsense, A = symbols('D_PWM, Rsense, A') i_out = D_PWM * (A/Rsense) print i_out solve(i_out, Rsense)
Result:
A*D_PWM/Rsense []
i_out was not declared as a character.
>>> from sympy import * >>> var('D_PWM, Rsense, A i_out') (D_PWM, Rsense, A, i_out) >>> eqn=Eq(i_out,D_PWM * (A/Rsense)) >>> solve(eqn,Rsense) [A*D_PWM/i_out]
Source: https://habr.com/ru/post/1657794/More articles:Google Maps MarkerClusterer integration with info window - google-mapsLaunching virtual boxing / stroller in cloud instance - vagrantKeep DRY but want to repeat for various reasons - ruby | fooobar.comFalse positive sonar by rule: Null pointers should not be dereferenced - javaHow to distinguish between USB and SD mount? - androidDjango windows authentication - pythonCannot start Google Admob campaign (always status is a red triangle) - admobShould structures be typedef'd in the C library? - cJava File.listFiles () returns files that "don't exist" according to `exists ()` - javaSetting file name encoding - javaAll Articles