plot inline functions

Home Forums Graphics and GUIs plot inline functions


This topic contains 19 replies, has 2 voices, and was last updated by  Ritai 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #1539


    Could someone explain how can I plot an inline function with more than one parameters;
    I mean if I have:

    strg = ’1./(1+x.^2)’;
    cauchy = inline (strg,’x');

    then if I type:

    fplot(cauchy,[-10 10])

    it works. But if I have:

    strg = ’1/sig*exp(-0.5*((x-mu)/sig).^2)’;
    norm = inline(strg, ‘x’, ‘mu’, ‘sig’);

    How can I plot this (norm)? Matlab always says that I don’t have enough parameters when trying fplot.

    thank you.


    Eric Verner

    I don’t believe that fplot can plot multiple parameters at the same time. That function won’t create a 3D graph based on an inline function with multiple variable inputs. I recommend creating arrays using your inline function, then plotting the arrays with a 3D plotting function such as surf or mesh.



    Thank you for the answer. I will try.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Bookmark and Share