Path: news.mathworks.com!newsfeed-00.mathworks.com!news.tele.dk!feed118.news.tele.dk!feed116.news.tele.dk!bofh.vszbr.cz!news.radio.cz!newsreader4.netcologne.de!news.netcologne.de!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Verticle line
Date: Sun, 04 Nov 2012 22:07:59 -0600
Organization: Aioe.org NNTP Server
Lines: 16
Message-ID: <k77e2v$9av$1@speranza.aioe.org>
References: <k77dgh$ser$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: 03OHbxeYZ4aQfmBse4/rhw.user.speranza.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2
X-Notice: Filtered by postfilter v. 0.8.2
Xref: news.mathworks.com comp.soft-sys.matlab:782024

On 11/4/2012 9:58 PM, Debkumar wrote:
> I need a help with a simple plot. I am new in matlab, so any help is much appreciated.
> Suppose I have z = [0.9 0.6 0.3 ...]. I want want to draw a plot with a vertical line of
>length 0.9 at x=1, another vertical line of length 0.6 at x=2 etc.
>Is there any simple and elegant way of doing this?
>
>
may be

---------------
close all;
z = [0.9 0.6 0.3];
stem(1:length(z),z)
axis([0 length(z)+1 min(z)-1 max(z)+1])
------------------