dsolve

Started by December 24, 2005
I want to solve 7 dependent differential equations. I run the following command:

[iar ibr icr ias ibs ics tr]=dsolve('sqrt(2)*cos(2*pi*f*t)=rs*ias+(Lls+Lms)Dias-1/2*Lms*Dibs-1/2*Lms*Dics+Lms*cos(tr)*Diar +Lms*cos(tr+2*pi/3)*Dibr+Lms*cos(tr-2*pi/3)*Dicr-Dtr*Lms*sin(tr)*iar -Dtr*Lms*sin(tr+2*pi/3)*ibr-Dtr*Lms*sin(tr-2*pi/3)*icr', ...
'sqrt(2)*cos(2*pi*f*t+2*pi/3)=rs*ibs-1/2*Lms*Dias+(Lls+Lms)*Dibs-1/2*Lms*Dics+Lms*cos(tr-2*pi/3)*Diar +Lms*cos(tr)*Dibr+Lms*cos(tr+2*pi/3)*Dicr-Dtr*Lms*sin(tr-2*pi/3)*iar -Dtr*Lms*sin(tr)*ibr-Dtr*Lms*sin(tr+2*pi/3)*icr', ...
'sqrt(2)*cos(2*pi*f*t-2*pi/3)=rs*ics-1/2*Lms*Dias-1/2*Lls*Dibs+(Lls+Lms)*Dics+Lms*cos(tr+2*pi/3)*Diar +Lms*cos(tr-2*pi/3)*Dibr+Lms*cos(tr)*Dicr-Dtr*Lms*sin(tr+2*pi/3)*iar -Dtr*Lms*sin(tr-2*pi/3)*ibr-Dtr*Lms*sin(tr)*icr ', ...
' 0=Lms*cos(tr)*Dias +Lms*cos(tr-2*pi/3)*Dibs+Lms*cos(tr+2*pi/3)*Dics-Dtr*Lms*sin(tr)*ias -Dtr*Lms*sin(tr-2*pi/3)*ibs-Dtr*Lms*sin(tr+2*pi/3)*ics+rr*iar+(Llr+Lms)Diar-1/2*Lms*Dibr-1/2*Lms*Dicr', ...
' 0=Lms*cos(tr+2*pi/3)*Dias +Lms*cos(tr)*Dibs+Lms*cos(tr-2*pi/3)*Dics-Dtr*Lms*sin(tr-2*pi/3)*ias -Dtr*Lms*sin(tr)*ibs-Dtr*Lms*sin(tr-2*pi/3)*ics+rr*ibr-1/2*Lms*Diar+(Llr+Lms)*Dibr-1/2*Lms*Dicr', ...
' 0=Lms*cos(tr-2*pi/3)*Dias +Lms*cos(tr+2*pi/3)*Dibs+Lms*cos(tr)*Dics-Dtr*Lms*sin(tr-2*pi/3)*ias -Dtr*Lms*sin(tr+2*pi/3)*ibs-Dtr*Lms*sin(tr)*ics+rr*icr-1/2*Lms*Diar-1/2*Lms*Dibr+(Llr+Lms)*Dicr', ...
' J*2/p*D2tr=-p/2*Lms*( (ias*(iar-1/2*ibr-1/2*icr)+ibs*(ibr-1/2*iar-1/2*icr)+ics*(icr-1/2*ibr-1/2*iar))*sin(tr) +sqrt(3)/2*(ias*(ibr-icr)+ibs*(icr-iar)+ics*(iar-ibr)) ) ', ...
'ias(0)=0 ibs(0)=0 ics(0)=0 iar(0)=0 ibr(0)=0 icr(0)=0 tr(0)=0 Dtr(0)=0' ,'t');
But I get this error:

??? Error using ==> dsolve
at offset 2205, `=` unexpected
Error in ==> mirsalim_elghai at 15
[iar ibr icr ias ibs ics tr]=dsolve('sqrt(2)*cos(2*pi*f*t)=rs*ias+(Lls+Lms)Dias-1/2*Lms*Dibs-1/2*Lms*Dics+Lms*cos(tr)*Diar +Lms*cos(tr+2*pi/3)*Dibr+Lms*cos(tr-2*pi/3)*Dicr-Dtr*Lms*sin(tr)*iar -Dtr*L Waht should I do?

Regards
Zeinab Ghofrani

Dear Friends

I forgot to bring all my m. file in the preveous message. This is the hole code in here: Jc.87;
p=4;
f`;
Lms=2/3*13.04/(2*pi*f);
Lls=.226/(2*pi*f);
Llr=.226/(2*pi*f);
rs=.029;
rr=.022;
[iar ibr icr ias ibs ics tr]=dsolve('sqrt(2)*cos(2*pi*f*t)=rs*ias+(Lls+Lms)*Dias-1/2*Lms*Dibs-1/2*Lms*Dics+Lms*cos(tr)*Diar +Lms*cos(tr+2*pi/3)*Dibr+Lms*cos(tr-2*pi/3)*Dicr-Dtr*Lms*sin(tr)*iar -Dtr*Lms*sin(tr+2*pi/3)*ibr-Dtr*Lms*s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ar-1/2*ibr-1/2*icr)+ibs*(ibr-1/2*iar-1/2*icr)+ics*(icr-1/2*ibr-1/2*iar))*sin(tr) +sqrt(3)/2*(ias*(ibr-icr)+ibs*(icr-iar)+ics*(iar-ibr)) ) ', ...
'ias(0)=0 ibs(0)=0 ics(0)=0 iar(0)=0 ibr(0)=0 icr(0)=0 tr(0)=0 Dtr(0)=0' ,'t'); I'd appreciate it if you could find me the mistake the code has. I get this error:

??? Error using ==> dsolve
at offset 2206, `=` unexpected
Error in ==> mirsalim_elghai at 15
[iar ibr icr ias ibs ics tr]=dsolve('sqrt(2)*cos(2*pi*f*t)=rs*ias+(Lls+Lms)*Dias-1/2*Lms*Dibs-1/2*Lms*Dics+Lms*cos(tr)*Diar +Lms*cos(tr+2*pi/3)*Dibr+Lms*cos(tr-2*pi/3)*Dicr-Dtr*Lms*sin(tr)*iar -Dtr* Best regards
Zeinab Ghofrani