LOGO
Start something that matters
Start something that matters
Stop wasting valuable time with projects that just isn't you.

Learn more and start today

ABOUT THE COMPANY

Key features of our company

Responsive

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore.

Passion

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore.

Design

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore.

Support

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore.

We know design.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore.

View Our Works

Buildings

THE TEAM

The ones who runs this company

John

John Doe

CEO & Founder

Phasellus eget enim eu lectus faucibus vestibulum. Suspendisse sodales pellentesque elementum.

Jane

Anja Doe

Art Director

Phasellus eget enim eu lectus faucibus vestibulum. Suspendisse sodales pellentesque elementum.

Mike

Mike Ross

Web Designer

Phasellus eget enim eu lectus faucibus vestibulum. Suspendisse sodales pellentesque elementum.

Dan

Dan Star

Designer

Phasellus eget enim eu lectus faucibus vestibulum. Suspendisse sodales pellentesque elementum.

14+
Partners
55+
Projects Done
89+
Happy Clients
150+
Meetings

OUR WORK

What we've done for people

A microphone
A phone
A drone
Soundbox
A tablet
A camera
A typewriter
A tableturner
×

Our Skills.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore.

Photography

90%

Web Design

85%

Photoshop

75%

PRICING

Choose a pricing plan that fits your needs.

  • Basic
  • 10GB Storage
  • 10 Emails
  • 10 Domains
  • Endless Support
  • $ 10

    per month
  • Pro
  • 25GB Storage
  • 25 Emails
  • 25 Domains
  • Endless Support
  • $ 25

    per month
  • Premium
  • 50GB Storage
  • 50 Emails
  • 50 Domains
  • Endless Support
  • $ 50

    per month

CONTACT

Lets get in touch. Send us a message:

Chicago, US

Phone: +00 151515

Email: mail@mail.com


-->

Thursday, 17 April 2014

HOW TO MAKE A MATLAB CODE FOR SECANT METHOD TO FIND OUT SOLUTION OF NONLENIAR EQUATION

4 . MATLAB CODE FOR SECANT METHOD

hello friends after many days i am coming back...
i hope you all are fine..
now let us start our matlab code for secant method and let us understand each command of this matlab code


% input function for finding root of nonliner equation
% s is stands for system if we are using any variable then we have to specified s that's why.......
a=input('enter function for finding real root:','s');
% a is now enter function by us
f=inline(a)
%inline indicates that when we have to find f(some point) then we can find by using inline function
%enter the first initial guess

x(1)=input('enter first initial guess: ');
%enter the second initial guess
x(2)=input('enter second initial guess: ');
%enter the tolerence up to which u have accuracy required
n=input('enter tolerance of the real root of given function: ');

%initialize iteration as 0
iteration=0;

%for loop for finding value of next point
for i=3:1000

%formula for secant method
   x(i) = x(i-1) - (f(x(i-1)))*((x(i-1) - x(i-2))/(f(x(i-1)) - f(x(i-2))));
   xn=x(i)
    iteration=iteration+1;
    if abs((x(i)-x(i-1))/x(i))*100<n
        root=x(i)
       iteration=iteration
        break
    end
end

NOTE: : after '%' whatever writing that is comment

now write this code in matlab and enjoy this......

and wait for our next post.......comming soon,,,,

No comments:

Post a Comment