Path: news.mathworks.com!not-for-mail
From: "Marcelo Tames" <jmarcelo.tb@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: operation with a vector of n elements
Date: Wed, 6 Feb 2008 17:32:03 +0000 (UTC)
Organization: M&#65533;lardalen University
Lines: 11
Message-ID: <focquj$ked$1@fred.mathworks.com>
Reply-To: "Marcelo Tames" <jmarcelo.tb@mathworks.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1202319123 20941 172.30.248.38 (6 Feb 2008 17:32:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 6 Feb 2008 17:32:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1272310
Xref: news.mathworks.com comp.soft-sys.matlab:449676


Hello, I just started studying matlab so my knowledge is 
little. I have this problem: Given a vector x with n 
elements, write a MATLAB function
with x as input parameter to form the vector p with elements
pk = x1*x2...xk1*xk+1...xn;

that is, pk will contain the products of all the vector 
elements except the kth. Then vector P = [p1 p2 ... pn]

I need help writing the program please
Thanks a lot