Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.5K Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How to separate, in a list, symbols and numbers?

Posted 2 years ago

Hello

ex= 2.5 x/(y*z)

How to proceed to separate the symbol and the number of the expression above in a list of the type:

{2.5,x(y/z)}

Sincerely,

Sinval

POSTED BY: Sinval Santos
2 Replies
Posted 2 years ago

The second option was better for my purpose. Thanks for the tip Hans.

POSTED BY: Sinval Santos
Posted 2 years ago

Maybe:

ex = 2.5 x/(y*z);

GatherBy[List @@ ex, NumericQ]

Another one:

{First@ex, Rest@ex}
POSTED BY: Hans Milton
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard