Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Problem while solving sinusodial equations

Subject: Problem while solving sinusodial equations

From: Michael

Date: 30 May, 2009 12:16:01

Message: 1 of 2

Greetings!!

I am a beginner and have problems solving the following equations:

g1=-sin(w*z+pi/2) + sin(w*z+pi/2-(4*pi)/3) + b*sin(5*w*z-pi/3) -(-sin(w*z+pi/2) - x*sin(5*w*z-y) + sin(w*z+pi/2-(4*pi)/3) + x*sin(5*w*z-u));
g2=-sin(w*z+pi/2-(4*pi)/3) + sin(w*z+pi/2-(2*pi)/3) + b*sin(5*w*z-pi) -(-sin(w*z+pi/2-(4*pi)/3) - x*sin(5*w*z-u) + sin(w*z+pi/2-(2*pi)/3) + x*sin(5*w*z-t));
g3=-sin(w*z+pi/2-(2*pi)/3) + sin(w*z+pi/2) + b*sin(5*w*z-(5*pi)/3) -(-sin(w*z+pi/2-(2*pi)/3) - x*sin(5*w*z-t) + sin(w*z+pi/2) + x*sin(5*w*z-y));
g4=(-sin(w*z+pi/2) - x*sin(5*w*z-y) + sin(w*z+pi/2-(4*pi)/3) + x*sin(5*w*z-u)) + (-sin(w*z+pi/2-(4*pi)/3) - x*sin(5*w*z-u) + sin(w*z+pi/2-(2*pi)/3) + x*sin(5*w*z-t)) + (-sin(w*z+pi/2-(2*pi)/3) - x*sin(5*w*z-t) + sin(w*z+pi/2) + x*sin(5*w*z-y));

With the variables x,y,u,t and with
z=[0:0.001:20E-3];
f=50;
w=2*pi*f;
b=0.067;

Perfect would be if all become zero but it tells me (solve-function) that this it not possible.

Is there any function that can help me to calcultate the variables that all equations become close to zero. fsolve-function refused to work because of wrong input data type??


Thanks for your help!!

Subject: Problem while solving sinusodial equations

From: Miroslav Balda

Date: 31 May, 2009 20:57:01

Message: 2 of 2

"Michael " <thebadphantom@gmx.de> wrote in message

SNIP

> Is there any function that can help me to calcultate the variables that all equations become close to zero. fsolve-function refused to work because of wrong input data type??

Hi Michael,

It is always difficult to solve set of nonlinear equations containing harmonic functions with unknowns in arguments. It is necessary that you have to have rather good estimate of the solution to get a chance of convergence of iterations. One way, how to overcome this difficulty is to solve many trial runs in which you choose such unknowns as random numbers from a known interval, and finaly to select the solution with minimum sum of squares of equation residuals.

I would use my function LMFnlsq from FEX Id. 17534, which is rather stable, however, it is impossible to guarantee the successful solution.

Good luck

Mira

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us