Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
plot (x,y, x,z) tricky

Subject: plot (x,y, x,z) tricky

From: muzaffar

Date: 7 Aug, 2008 09:19:01

Message: 1 of 3

HI, everybody,
i have the following data
f=[ 2 4 6 8 10 12 14 16 ]
a=[60 65 70 70 75 80 90 95 ]
b=[2.5 3.0 3.5 4.0 4.5 5.0 5.5 5.0]
(these are just for simplity original values may be
different)

i want to plot(f,a)
          and plot(f,b) on the same graph but
the problem is the following:
f is same or x axis should be from 2 to 16 in both cases
but
y axis on left should be from 60 to 95 range
y axis on right side should be 2.5 to 5.5 range

so in the end i want see one graph with x and y axis left
side and curve to see plot(f,a) and x and y axis right
side label values to see plot(f,b) but on the same graph.
is it possible in matlab?
kind regards

Subject: plot (x,y, x,z) tricky

From: Bruno Luong

Date: 7 Aug, 2008 09:24:02

Message: 2 of 3

help plotyy

% Bruno

Subject: plot (x,y, x,z) tricky

From: muzaffar

Date: 7 Aug, 2008 09:47:02

Message: 3 of 3

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in
message <g7eevi$oh9$1@fred.mathworks.com>...
> help plotyy
>
> % Bruno

thanks Bruno.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us