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$>
References: <ibvdpc$lns$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1289961483 21692 (17 Nov 2010 02:38:03 GMT)
NNTP-Posting-Date: Wed, 17 Nov 2010 02:38:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:687481

"raaj kumar" <> wrote in message <ibvdpc$lns$>...
> 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