From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Condensing a vector
Date: Thu, 9 Apr 2009 04:43:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 7
Message-ID: <grjucl$mp1$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1239252181 23329 (9 Apr 2009 04:43:01 GMT)
NNTP-Posting-Date: Thu, 9 Apr 2009 04:43:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1056072
Xref: comp.soft-sys.matlab:531570

Hi All,

I have a vector  (A) with n items, and I'd like to build a new vector (B) based on the old vector, that has m items, where m > n. I need the values of the items in B to be a  "condensed" version of the values in A. For example, if A = (0,2,10) and m=5 , then B will be (0,1,2,6,10). Basically the idea is to somehow "plot" A, then set the X values to be 1:1:m and B is the Y values of that new "plot".