Last active
December 28, 2015 21:49
-
-
Save thorade/7567373 to your computer and use it in GitHub Desktop.
create a Matlab plot with two y axes, then add a third and fourth line to it
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = -pi:.1:pi; | |
f1 = sin(x); | |
f2 = 100*cos(x); | |
f3 = cos(x/2); | |
f4 = 100*sin(x/2); | |
[axes,linehandle1,linehandle2] = plotyy(x, f1, x, f2); | |
linehandle3=line(x,f3,'Parent',axes(1),'LineWidth',2,'LineStyle','--'); | |
linehandle4=line(x,f4,'Parent',axes(2),'LineWidth',2,'LineStyle','--'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment