Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Matlab problem with using the "solve" function for Algebraic equations

Status
Not open for further replies.

doreen105

Newbie level 6
Joined
Jun 4, 2007
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Beijin ,China
Activity points
1,397
Hi everyone:
I have met problem when I use function 'solve" to solve Algebraic equations.

The warning is: explicit solution could not be found

In solve at 140

result=[empty sym]

Can any one help me???Thanks in advance.
 

Re: Matlab problem

can you specify it?
what's the source program?[/quote]
 

Re: Matlab problem

can you put the program that you wrote but any way you can make help about solve function in matlap and you can get the correct syntax .
i thank that this function is used with symbolic equations.
 

Re: Matlab problem

Look I have got the same error while integrating some function ,so if you can show me your equations i can suggest you the way
 

Re: Matlab problem

This is my code:
syms a1 a2 a3 a4 a5 g1 g2 g3 g4 g5 b1 b2 H z;

y=sym('(1-b1*(H^2)*g2*g3)*(1-b2*(H^2)*g4*g5)+H*g1*a1*(1-b1*(H^2)*g2*g3)*(1-b2*(H^2)*g4*g5)+(H^2)*g1*g2*a2*(1-b2*(H^2)*g4*g5)+H^3*g1*g2*g3*a3*(1-b2*(H^2)*g4*g5)+H^4*g1*g2*g3*g4*a4+H^5*g1*g2*g3*g4*g5*a5');

fm=collect(y,'H')

x=sym('(1-b1*(H^2)*g2*g3)*(1-b2*(H^2)*g4*g5)');

fz=collect(x,'H')

fm1=sym('(z-1)^5+(g1*a1*b1*g2*g3*b2*g4*g5-g1*g2*g3*a3*b2*g4*g5+g1*g2*g3*g4*g5*a5)*1+(b1*g2*g3*b2*g4*g5-g1*g2*a2*b2*g4*g5+g1*g2*g3*g4*a4)*(z-1)+(-g1*a1*b2*g4*g5-g1*a1*b1*g2*g3+g1*g2*g3*a3)*(z-1)^2+(-b2*g4*g5-b1*g2*g3+g1*g2*a2)*(z-1)^3+g1*a1*(z-1)^4')

fz1=sym('(z-1)^5+b1*g2*g3*b2*g4*g5*(z-1)+(-b2*g4*g5-b1*g2*g3)*(z-1)^3')

fz2=collect(fz1,'z')

fm2=collect(fm1,'z')

[B,A]=butter(5,0.5,'high')

B=B*18.9394*1.0003

A=A

[H,F]=freqz(B,A,100);

Hf=abs(H);

Hx=angle(H);

plot(F,Hf)

result=solve('10-b2*g4*g5-b1*g2*g3=B(3)','-10+3*b2*g4*g5+3*b1*g2*g3=B(4)','5+b1*g2*g3*b2*g4*g5-3*b2*g4*g5-3*b1*g2*g3= B(5) ','-1-b1*g2*g3*b2*g4*g5+b1*g2*g3+b2*g4*g5= B(6)','g1*a1-5=A(2)','-b1*g2*g3-b2*g4*g5-4*g1*a1+10+g1*g2*a2=A(3)','3*b2*g4*g5-3*g1*g2*a2+g1*g2*g3*a3+6*g1*a1-g1*a1*b2*g4*g5-g1*a1*b1*g2*g3+3*b1*g2*g3-10=A(4)','-3*b2*g4*g5+2*g1*a1*b2*g4*g5+3*g1*g2*a2-g1*g2*a2*b2*g4*g5+5-4*g1*a1+b1*g2*g3*b2*g4*g5+2*g1*a1*b1*g2*g3-2*g1*g2*g3*a3-3*b1*g2*g3+g1*g2*g3*g4*a4=A(5)','-1-g1*g2*a2+b1*g2*g3-b1*g2*g3*b2*g4*g5-g1*a1*b1*g2*g3-g1*a1*b2*g4*g5+g1*a1*b1*g2*g3*b2*g4*g5+b2*g4*g5-g1*g2*g3*a3*b2*g4*g5-g1*g2*g3*g4*a4+g1*g2*g3*g4*g5*a5+g1*g2*g3*a3+g1*g2*a2*b2*g4*g5+g1*a1=A(6)','a1','a2','a3','a4','g1','g2','g3','g4','g5')


my code is to caculate the coefficients of my digital system...

Thanks in advance
 

Re: Matlab problem

Hi,
I think that the error you get is due to that you didn't install the symbolic math toolbox or the extended math toolbox. This i ssolved nby installing them from the MatLab source.
Hope this helps,
 

Re: Matlab problem

Every freshman/woman:
I just run successfully some commands in delsig toolbox. There is at least a necessary step not mentioned above, that is search path setting. Please enter menu File-- Set Path...--Add Folder...--, then browse into the target toolbox path where you have put it.(e.g. C:\MATLAB7\toolbox\delsig\delsig).

enjoy it!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top