Author Topic: plot multiple functions  (Read 1843 times)

Offline kluni

  • Newbie
  • *
  • Posts: 1
  • Matlab Forum
    • View Profile
plot multiple functions
« on: March 20, 2010, 11:06:30 AM »
Hello,


How can one plot multiple functions in matlab, but for example:
the first function is defined for an interval 0<x<0.13
the second function defined for an interval 0.13<x<0.16


I am new, just needed to plot some functions.


Thanks in advance,
Kluni.

Offline Martin Bruha

  • Newbie
  • *
  • Posts: 2
  • Matlab Forum
    • View Profile
Re: plot multiple functions
« Reply #1 on: May 08, 2010, 09:57:52 PM »
Hi kluni,

I am not sure I understand correctly your problem.

You can use 'subplot' to plot more figures in separate windows like
subplot(2,1,1),plot(x1,y1)
subplot(2,1,2),plot(x2,y2)

or you can plot the first one, then use command 'hold on' and plot the second one -> both figures will be in one window

Offline England90

  • Jr. Member
  • *
  • Posts: 15
  • Matlab Forum
    • View Profile
Re: plot multiple functions
« Reply #2 on: October 31, 2010, 04:57:52 PM »
I am also considering this issue, thanks if sharing!

Matlab and SimuLink Development Forum

Re: plot multiple functions
« Reply #2 on: October 31, 2010, 04:57:52 PM »