开发者

How to plot three curves on same plot with same X axis but different Y axes in MATLAB? [duplicate]

T开发者_开发知识库his question already has answers here: Closed 11 years ago.

Possible Duplicate:

Plotting 4 curves in a single plot, with 3 y-axes

I have three vectors of data: A, B, C, that are function of time t (same t-values to 3 of them). I want to plot all three in same graph (3 different curves), but MATLAB makes them all relative to the same Y-axis, and since they are in different scales (one is from 1 to 100 and another from -5K to +5K), it minimizes the small-scale curves to nearly zero.

I just want to see how they are synchronized, but I don't care about the size relation between them. How do I do that ?


Since you have several variables, you may to consider to scale them to some common reference, for example summing up. Like:

A= A/ sum(A);
B= B/ sum(B);
C= C/ sum(C);

or

A= A/ sum(abs(A));
B= B/ sum(abs(B));
C= C/ sum(abs(C));

or

A= A/ sum(A^2);
B= B/ sum(B^2);
C= C/ sum(C^2);

And then just plot them.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜