Hi, I'm trying to plot two functions. One is a Debye function in Matlab multiplied by some other stuff and the other is a regular function. How do I do this? Does Matlab have a toolbox for this?
+1
A:
If you can calculate the function value y(x)
at every x
you want to plot, you simply write plot(x,y)
, where each entry in the vector y
corresponds to the entry in x
for which the function was evaluated. Here's the help for plot
.
If you want to plot a function of the form f(x)==0
, or f(x,y)=0
, you can alternatively use EZPLOT. For example, you can write ezplot('x*sin(x)',-5:0.5:5)
, which will plot the function x*sin(x)
over the interval [-5 5]
in steps of 0.5
.
Jonas
2010-05-24 01:45:10