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: Graphically add or nonlinear rescale
Replies: 4   Last Post: Nov 12, 2012 9:50 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Peter Mairhofer

Posts: 41
Registered: 8/18/10
Graphically add or nonlinear rescale
Posted: Nov 11, 2012 9:57 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


I have two non-linear functions f1 and f2, both with a non-linear
scaling vector x1 and x2.

When I use

plot(x1, f1); hold on;
plot(x2, f2, 'r');

MATLAB perfectly prints the two graphs, no matter that x1 and x2 have
different (nonlinear) structure (in particular, x1 and x2 are
logarithmic and have different lengths).

Now I want to add these functions. But I can't just add f1 and f2
because the lengths are different and the x-axis do not match.

Is there a way to rescale data or export the graphs with a given amount
of spacing and from/to range so that I can add them?


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.