Message Boards Message Boards

0
|
1882 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Seperator Polynomial Powers in equations

Posted 11 months ago

POSTED BY: Sheng Dai
4 Replies
Posted 11 months ago

Does this do what you want?

ReplaceAll[{0.710411+3.67653s+s^2,
  1.42082+3.67653s+s^2,
  2.13123+3.67653s+s^2,
  2.84164+3.67653s+s^2,
  3.55206+3.67653s+s^2,
  4.26247+3.67653s+s^2,
  4.97288+3.67653s+s^2,
  5.68329+3.67653s+s^2,
  6.3937+3.67653s+s^2,
  7.10411+3.67653s+s^2,
  7.81452+3.67653s+s^2,
  8.52493+3.67653s+s^2,
  9.23535+3.67653s+s^2,
  9.94576+3.67653s+s^2,
  10.6562+3.67653s+s^2,
  11.3666+3.67653s+s^2,
  12.077+3.67653s+s^2,
  12.7874+3.67653s+s^2,
  13.4978+3.67653s+s^2,
  14.2082+3.67653s+s^2},p_+q_*s+s^2->{p,q,1}]

which returns

{{0.710411,3.67653,1},{1.42082,3.67653,1},{2.13123,3.67653,1},{2.84164,3.67653,1}, 
  {3.55206,3.67653,1},{4.26247,3.67653,1},{4.97288,3.67653,1},{5.68329,3.67653,1}, 
  {6.3937,3.67653,1},{7.10411,3.67653,1},{7.81452,3.67653,1},{8.52493,3.67653,1}, 
  {9.23535,3.67653,1},{9.94576,3.67653,1},{10.6562,3.67653,1},{11.3666,3.67653,1}, 
  {12.077,3.67653,1},{12.7874,3.67653,1},{13.4978,3.67653,1},{14.2082,3.67653,1}}

or

{0.710411+3.67653s+s^2,
 1.42082+3.67653s+s^2,
 2.13123+3.67653s+s^2,
 2.84164+3.67653s+s^2,
 3.55206+3.67653s+s^2,
 4.26247+3.67653s+s^2,
 4.97288+3.67653s+s^2,
 5.68329+3.67653s+s^2,
 6.3937+3.67653s+s^2,
 7.10411+3.67653s+s^2,
 7.81452+3.67653s+s^2,
 8.52493+3.67653s+s^2,
 9.23535+3.67653s+s^2,
 9.94576+3.67653s+s^2,
 10.6562+3.67653s+s^2,
 11.3666+3.67653s+s^2,
 12.077+3.67653s+s^2,
 12.7874+3.67653s+s^2,
 13.4978+3.67653s+s^2,
 14.2082+3.67653s+s^2}/.p_+q_*s+s^2->{p,q,1}

which returns

{{0.710411,3.67653,1},{1.42082,3.67653,1},{2.13123,3.67653,1},{2.84164,3.67653,1}, 
 {3.55206,3.67653,1},{4.26247,3.67653,1},{4.97288,3.67653,1},{5.68329,3.67653,1}, 
 {6.3937,3.67653,1},{7.10411,3.67653,1},{7.81452,3.67653,1},{8.52493,3.67653,1}, 
 {9.23535,3.67653,1},{9.94576,3.67653,1},{10.6562,3.67653,1},{11.3666,3.67653,1}, 
 {12.077,3.67653,1},{12.7874,3.67653,1},{13.4978,3.67653,1},{14.2082,3.67653,1}}
POSTED BY: Bill Nelson

What is your actual input?

POSTED BY: Daniel Lichtblau

Have a look at the function CoefficientList:

CoefficientList[0.710411 + 3.67653 s + s^2, s]
POSTED BY: Gianluca Gorni

There is no actual definition of listPower in that notebook. Is it intended to be an image?

POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract