Matlab: Custom Graph Drawing & Adding Peaks

  • Context: MATLAB 
  • Thread starter Thread starter Air
  • Start date Start date
  • Tags Tags
    Graph Matlab
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
4 replies · 8K views
Air
Messages
202
Reaction score
0
How can I draw a graph on Matlab which is custom. I want to add peaks to a curve. I've drawn a simple quadratic curve but want to add some custom peaks. What code would I type? Is is possible to do such a thing on Matlab? Thanks in advance.
 
Physics news on Phys.org
Not to calculate the quadratic, I have plotted:

Code:
x=0:.5:20;
y=(x-5).^2+10;
plot(x, y);

But I want to add some peaks. Make a custom graph. Sorry but I don't understand what you mean.
 
What do you mean you "want to add peaks to a quadratic"?

I can probably help you out with this since I've been using Matlab for years, but I've never heard that particular phrase before.