Thread Subject: Solve Array of symbolic functions

Subject: Solve Array of symbolic functions

From: Quint Segers

Date: 30 Oct, 2007 15:03:24

Message: 1 of 4

if A1 is an array of symbolic funtions:
A1=
              -a1+a2-a3+a4
 -1/27*a1+1/9*a2-1/3*a3+a4
  1/27*a1+1/9*a2+1/3*a3+a4
               a1+a2+a3+a4

Why can't I use solve like:

[a1, a2, a3, a4] = solve('A1(1)=1', 'A1(2)=0', 'A1(3)
=0', 'A1(4)=0', a1, a2, a3, a4);

But must I manually insert all the values of A1 like this?:

[a1, a2, a3, a4] = solve('-a1+a2-a3+a4=1', '-1/27*a1+1/9*a2-
1/3*a3+a4=0', '1/27*a1+1/9*a2+1/3*a3+a4=0', 'a1+a2+a3+a4=0',
 a1, a2, a3, a4)[a1, a2, a3, a4] = solve('-a1+a2-
a3+a4=1', '-1/27*a1+1/9*a2-
1/3*a3+a4=0', '1/27*a1+1/9*a2+1/3*a3+a4=0', 'a1+a2+a3+a4=0',
 a1, a2, a3, a4)

Subject: Solve Array of symbolic functions

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 30 Oct, 2007 16:06:18

Message: 2 of 4

In article <fg7h3s$mk1$1@fred.mathworks.com>,
Quint Segers <q.segers@gmail.com> wrote:
>if A1 is an array of symbolic funtions:
>A1=
> -a1+a2-a3+a4
> -1/27*a1+1/9*a2-1/3*a3+a4
> 1/27*a1+1/9*a2+1/3*a3+a4
> a1+a2+a3+a4
>
>Why can't I use solve like:
>
>[a1, a2, a3, a4] = solve('A1(1)=1', 'A1(2)=0', 'A1(3)
>=0', 'A1(4)=0', a1, a2, a3, a4);

Try,

[a1, a2, a3, a4] = solve([A1(1) '=1'], A1(2), A1(3), A1(4), a1, a2, a3, a4)
--
  "There are some ideas so wrong that only a very intelligent person
  could believe in them." -- George Orwell

Subject: Solve Array of symbolic functions

From: Ben Hinkle

Date: 30 Oct, 2007 18:58:32

Message: 3 of 4


"Walter Roberson" <roberson@ibd.nrc-cnrc.gc.ca> wrote in message
news:fg7kpq$2vn$1@canopus.cc.umanitoba.ca...
> In article <fg7h3s$mk1$1@fred.mathworks.com>,
> Quint Segers <q.segers@gmail.com> wrote:
>>if A1 is an array of symbolic funtions:
>>A1=
>> -a1+a2-a3+a4
>> -1/27*a1+1/9*a2-1/3*a3+a4
>> 1/27*a1+1/9*a2+1/3*a3+a4
>> a1+a2+a3+a4
>>
>>Why can't I use solve like:
>>
>>[a1, a2, a3, a4] = solve('A1(1)=1', 'A1(2)=0', 'A1(3)
>>=0', 'A1(4)=0', a1, a2, a3, a4);
>
> Try,
>
> [a1, a2, a3, a4] = solve([A1(1) '=1'], A1(2), A1(3), A1(4), a1, a2, a3,
> a4)

Will that concatenation work? An alternative:

[a1, a2, a3, a4] = solve(A1(1)-1, A1(2), A1(3), A1(4), a1, a2, a3, a4)


Subject: Solve Array of symbolic functions

From: Quint Segers

Date: 26 Dec, 2007 13:16:50

Message: 4 of 4


> [a1, a2, a3, a4] = solve(A1(1)-1, A1(2), A1(3), A1(4),
a1, a2, a3, a4)

Thanks. This one gives me the right result.
Quint

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
solve symbolic ... Quint Segers 30 Oct, 2007 11:05:22
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com