```Path: news.mathworks.com!newsfeed-00.mathworks.com!fu-berlin.de!feeder.erje.net!eu.feeder.erje.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Monomial basis value
Date: Mon, 20 May 2013 16:38:07 -0500
Organization: Aioe.org NNTP Server
Lines: 44
Message-ID: <kne53s\$jcr\$1@speranza.aioe.org>
References: <knd79k\$brj\$1@newscl01ah.mathworks.com>
NNTP-Posting-Host: IEPkE0G3ORSxtEgkYjUKDQ.user.speranza.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6
X-Notice: Filtered by postfilter v. 0.8.2
Xref: news.mathworks.com comp.soft-sys.matlab:795845

On 5/20/2013 8:09 AM, fatih wrote:
> Hi eveyrbody,
>
> I have this question.
> k=2;
> Q=sym(zeros(k+1,1));
> for i=1:k+1
>      syms x
>      Q(i,:)=x^(i-1);
> end
> Q
> Q =
>
> [   1]
> [   x]
> [ x^2]
>
> My first question is that: Is Q in a matrix form?

It depends on how you define a "matrix form"

The above looks like a vector to me. But others might it matrix as well in Matlab talk.

> Second is that: What is the value of Q(i)*Q(j) for x=0 and x=1? How can I
> write it in the programme?
>

help subs()

EDU>> i=1; j=2;
EDU>> r=Q(i)*Q(j)

x

EDU>> subs(r,x,0)

0

EDU>> subs(r,x,1)

1

--Nasser
```