Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8420507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:53:56+00:00 2026-06-10T02:53:56+00:00

I have this function defined in a m-file: function[it,xvect,xdif,fx]=bisez(a,b,nmax,toll,fun) it=-1; xvect=[]; xdif=[]; fx=[]; err=toll+1;

  • 0

I have this function defined in a m-file:

function[it,xvect,xdif,fx]=bisez(a,b,nmax,toll,fun)
it=-1;
xvect=[];
xdif=[];
fx=[];
err=toll+1;

while(it<nmax && err>toll)
x=(b+a)/2;
  if(fun(x)==0)
    err=0;
  else
    err=abs(b-a)/2;
  end
it=it+1;
xvect=[xvect;x];
xdif=[xdif;err];
fx=[fx:fun(x)];
  if(fun(x)*fun(a)>0)
    a=x;
  else
    b=x;
  end;
end;
if(it<nmax)
  fprintf('Convergence computed at step k:%d\n',it);
else
  fprinf('Iteration limit reached: %d\n',it);
end
  fprintf('Computed root: %-12.8f\n',xvect(it+1));
return

Then if I try to invoke it with these commands:

fun=@(x)exp(x);
a=1;
b=1.5;
nmax=1000;
toll=2;
bisez(a,b,nmax,toll,fun)

I get this error:

??? Undefined function or method 'bisez' for input arguments of type 'function_handle'.

What am I missing?

PS: I’m using Matlab 2007b

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T02:53:57+00:00Added an answer on June 10, 2026 at 2:53 am

    It appears it is not in your PATH when you run it.

    If I run it from my PATH I get:

    >> bisez(a,b,nmax,toll,fun)
       Convergence computed at step k:0
       Computed root: 1.25000000  
    
       ans =
    
            0
    

    Outside of my PATH:

    >> bisez(a,b,nmax,toll,fun)
       Undefined function 'bisez' for input arguments of type 'function_handle'.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Javascript function defined in the main index.html file. One part of this
I have this self-defined function in my .bashrc : function ord() { printf '%d'
I have this user defined function. public partial class UserDefinedFunctions { static int i;
I have an inline member function defined under class MyClass int MyClass::myInlineFunction(); This function
I have a function defined like this: public static void ShowAbout(Point location, bool stripSystemAssemblies
Suppose I have a function defined like this: class Foo() { public: void bar(MyClass*
In an ASP.MVC application, I have a function defined in my _ViewStart.cshtml like this:
I have the following object defined function BusinessUnit(id, name, code) { this.id = ko.observable(id);
I have a simple function GetPageName(String PageFileName, String LangCode) defined inside a class file.
I have a static inline function defined in an H file, and at one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.