Clear Filters
Clear Filters

how do i combine these two plots >> a = 10; >> b = 0: pi/a: 2*pi; >> plot(b,sin(b)) >> a = 10; >> b = 0: pi/a: 2*pi; plot(b,cos(b)) into one plot

1 view (last 30 days)
how do i combine these two plots
a = 10;
b = 0: pi/a: 2*pi;
plot(b,sin(b)),
a = 10;
b = 0: pi/a: 2*pi;
plot(b,cos(b))
into one plot

Answers (1)

Azzi Abdelmalek
Azzi Abdelmalek on 25 Nov 2013
Edited: Azzi Abdelmalek on 25 Nov 2013
a1= 10;
b1=0: pi/a1: 2*pi;
a2 = 10;
b2= 0: pi/a2: 2*pi;
plot(b1,sin(b1),b2,cos(b2))
%or
plot(b1,sin(b1))
hold on
plot(b2,sin(b2))
% or use plotyy

Categories

Find more on Two y-axis in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!