The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Matlab two functions with different axis in one graph
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  

Posts: 2
Registered: 11/26/13
Matlab two functions with different axis in one graph
Posted: Nov 26, 2013 2:15 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I want to draw a single graphic that has two or three different functions each with different axis limits.

For example,
when x < -2 draw (x + 4 * x)
when -2 < x < 5 draw sqrt(x)/2
when 5 < x draw sin(x)

I can't figure out how to do it as if I try to change axis limit it affects both functions and I can only see that part of graph. Should I try using for loop to get coordinates for each into array?
Could someone help me out? Thanks.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.