From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Verticle line
Date: Sun, 04 Nov 2012 22:07:59 -0600
Organization: NNTP Server
Lines: 16
Message-ID: <k77e2v$9av$>
References: <k77dgh$ser$>
Reply-To: <HIDDEN>
NNTP-Posting-Host: 03OHbxeYZ4aQfmBse4/
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
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: 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];
axis([0 length(z)+1 min(z)-1 max(z)+1])