Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: what do i have to do here to get the vectors the same size without vompromising the graphs integrity?
Date: Wed, 17 Nov 2010 02:38:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 13
Message-ID: <ibvf6b$l5s$1@fred.mathworks.com>
References: <ibvdpc$lns$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1289961483 21692 172.30.248.35 (17 Nov 2010 02:38:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 17 Nov 2010 02:38:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:687481

"raaj kumar" <tambalan30@yahoo.co.uk> wrote in message <ibvdpc$lns$1@fred.mathworks.com>...
> hey guys im trying to draw a graph and its not plotting because the vectors are not equal, how do i make them equal without chaning the integrity of the graph, so it still represents the same thing??
> .......
> d=0:0.01:10;
> ........
> for i=1:100
>     d(i)=0.1*(i-1);
>     F(i)=1-(1./(1+exp((d(i)-d50)/w)));
> end
- - - - - - - - - - - -
  Earlier in your code you wrote d=0:0.01:10; which places 1001 entries into vector d.  In the subsequent for-loop you have only given F a hundred elements.  If that is the extent of vector F, they would of course be of different sizes.  How is 'plot' supposed to know what you want?  You must always give it vectors with like numbers of elements if it is to know what pairs to plot.

Roger Stafford