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 vertical line based on one integer

Subject: plot vertical line based on one integer

From: Sofia Häggberg

Date: 2 Dec, 2010 16:53:05

Message: 1 of 2

lets say I have already data on my axes... which are e.g. x=1:100 y=1:10

the hold on command is on

and now in the end of the program I get an integer a=44

which command I should put to plot a simple vertical line in x-axis = 44 ???

thanks mates

Subject: plot vertical line based on one integer

From: Sean de

Date: 2 Dec, 2010 17:00:25

Message: 2 of 2

"Sofia Häggberg" <hd.int.assNOSPAM@gmail.com> wrote in message <id8ith$5an$1@fred.mathworks.com>...
> lets say I have already data on my axes... which are e.g. x=1:100 y=1:10
>
> the hold on command is on
>
> and now in the end of the program I get an integer a=44
>
> which command I should put to plot a simple vertical line in x-axis = 44 ???
>
> thanks mates

plot([44 44],[1 10],'b-')

or use VLINE on the FEX.

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