y軸が異なるプロット

MatLabで共通のx軸を持ち,y軸のみが異なるプロットを一つのグラフに入れたい時.

plotyyを使う.
x=1:20;
y1=exp(x);
y2=log(x);
plotyy(x, y1, x, y2);

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s