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:
How to use fzero and fsolve function

Subject: How to use fzero and fsolve function

From: Ashwin Balaji

Date: 13 Jul, 2011 01:13:11

Message: 1 of 2

Hello,

Could anyone please guide me through the code for using fsolve or fzero function. I have a non linear eqn to solve and solve function i guess won't be of much help.

I am not able to figure out the code for a solving this non linear eqn using fzero and fsolve. I have tried addressing this issue using Newton raphson and would like to verify my answers through the fzero and fsolve function. Can anyone help me through the code.

-Ashwin

Subject: How to use fzero and fsolve function

From: edward kabanyas

Date: 13 Jul, 2011 01:53:07

Message: 2 of 2

Hi Ashwin;

> my answers through the fzero and fsolve function. Can anyone help me through the code.
It may be better to put your effort first, your code. You could take this an example:

f=@(x)1/sqrt(pi)*gamma(x+1.5)/gamma(x+2)- y;
z = fzero(f,a)
a = your initial value (first assumption)
z = the value of x.

Hope it works.

=Edward=

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