Path: news.mathworks.com!not-for-mail
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$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1239252181 23329 172.30.248.35 (9 Apr 2009 04:43:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 9 Apr 2009 04:43:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1056072
Xref: news.mathworks.com 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".

thanks

Yoav