The second function takes the parameter value as input and returns Y coordinates.įor example, I can use it to recreate the cubic Bézier curve from this blog post.
The first function takes the parameter value as input and returns X coordinates. To do this, we just pass it two functions. xlim(pi/2 + )Īnother big enhancement is that fplot can now do parametric curves as well as plotting Y as a function of X. The reason Cleve likes this function is that it's a bit of a torture test!Īnd we can get even more detail if we zoom in. And it labeled the asymptotes for use, although it missed the one at $-\pi/2$. tan(sin(x)) + sin(tan(x)))Īs you can see, it does a better of resolving the details in those tricky bits. This is what the previous version of fplot did with that.Īnd here's the R2016a version. When we first showed the new fplot to Cleve, he gave it one of his favorite functions. The new version of fplot has a lot of nice refinements, such as the nice legend entries in those last two examples. For example, I can reproduce that plot with a single call to fplot by calling besselj with a symbolic variable for the domain and a vector for the order. In addition to functions, if you have the Symbolic Math Toolbox, fplot can also accept symbolic variables now. This is really useful for getting a "quick feel" for the shape of a function, or a family of functions. Then fplot will use that function to draw a curve. The basic idea is that you pass it a function which takes X coordinates as inputs and returns Y coordinates as outputs. The fplot function has been around for a long time. Another new feature that I really like in R2016a is the upgraded fplot function and all of the new members of the fplot family.