Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Insert different values in a vector
Date: Tue, 24 Feb 2009 06:28:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 21
Message-ID: <go041i$p6b$1@fred.mathworks.com>
References: <gnvt4s$gbs$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 1235456882 25803 172.30.248.35 (24 Feb 2009 06:28:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 24 Feb 2009 06:28:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:520363

"Sylvie " <sylpel@yorku.ca> wrote in message <gnvt4s$gbs$1@fred.mathworks.com>...
> Hi there,
> 
> I have 4 vectors with 72 values each. I would like to insert the 3 last vectors into the 1st one:
> 
>  A=[0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50]
> B=[1, 6, 11, 16, 21, 26, 31, 36, 41, 46, 51]
> C=[1.5, 6.6, 11.8, 16.4, 21.9, 26.6, 31.8, 36.9, 41.7, 46.4, 51.9]
> D=[2.5, 7.6, 12.8, 17.4, 22.9, 27.6, 32.8, 37.9, 42.7, 47.4, 52.9]
> 
> I want to create the vector A=[0, 1, 1.5, 2.5, 5, 6, 6.6, 7.6, 10, 11, 11.8, 12.8, (...), 52.9]
> 
> Any ideas?
> 
> Thank you!!
> 
> Sylvie

 M = reshape([A;B;C;D],1,[]);

Roger Stafford