Path: news.mathworks.com!not-for-mail
From: "Mohammad " <jaber2@uni.uiuc.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Summation
Date: Fri, 6 Aug 2010 22:45:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 15
Message-ID: <i3i39h$44i$1@fred.mathworks.com>
Reply-To: "Mohammad " <jaber2@uni.uiuc.edu>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1281134705 4242 172.30.248.38 (6 Aug 2010 22:45:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 6 Aug 2010 22:45:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2384296
Xref: news.mathworks.com comp.soft-sys.matlab:659926

Dear reader,

I have a vector with r entries which are imputed previously. I want to PLOT a function v(x), such that v=@x Star(1,1)*sin(pi*x)+Star(1,2)*sin(2*pi*x)+Star(1,3)*sin(3*pi*x)+....Star(1,n)*sin(n*pi*x)+...Star(1,r-1)*sin((r-1)*pi*x)+Star(1,r)*sin(r*pi*x)

Is there a simple way to do this using matrix summation.

(P.S. I only need to plot it, so if there is a way to  not need to create a function, I'll take it)

This is what I though of so far:
Yarr=ones(r,200)
for i = 1:r
for x = 1:200
Yarr(i,x)=Star(1,i)*sin(i*pi*x)
end
end