Question: RE: replacing all subexpressions

Dear All, 

When I tried to replace all occurrences of an expression (two occurrences in total), only one of them (the last one with 'R__arm/2' coefficient) was replaced. I wonder if there is a way to make sure that all the occurrences are replaced by the intended substitute. 


 

restart;

with(Student[LinearAlgebra]):

eq4:= v__a(t) = (v__an(t)-v__ap(t))/2 - L__arm/2*diff([i__ap(t)-i__an(t)], t) - R__arm/2*(i__ap(t)-i__an(t));

v__a(t) = (1/2)*v__an(t)-(1/2)*v__ap(t)-(1/2)*L__arm*[diff(i__ap(t), t)-(diff(i__an(t), t))]-(1/2)*R__arm*(i__ap(t)-i__an(t))

(1)

eq4_2:= subs([i__ap(t)-i__an(t) = i__a(t)], eq4);

v__a(t) = (1/2)*v__an(t)-(1/2)*v__ap(t)-(1/2)*L__arm*[diff(i__ap(t), t)-(diff(i__an(t), t))]-(1/2)*R__arm*i__a(t)

(2)

 


 

Download Maximum_Modulation_Index_for_MMC_with_CCC.mw

Please Wait...