Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Graphically add or nonlinear rescale

$
0
0
Hi,

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?

Thanks,
Peter

Viewing all articles
Browse latest Browse all 19628

Trending Articles