Group Abstract Group Abstract

Message Boards Message Boards

Use the numbers found in an optimization problem somewhere else?

Posted 8 years ago
POSTED BY: Ovunc Yilmaz
3 Replies

Ovunc,

you can reference the x and y variables with a replace.

Let's say you want the x value from the fifth result -- so take the second element from the fifth result (which is the list of x and y rules):

x /. c1[[5, 2]]

You can use this to restructure your results into a matrix:

lookupTable = Map[{#[[1]], x /. #[[2]], y /. #[[2]]} &, c1];

and look at it as a grid:

Grid[lookupTable , Frame -> All]

enter image description here

or export / use it.

Regards

POSTED BY: Neil Singer
Posted 8 years ago

Amazing! Thank you so much!

POSTED BY: Ovunc Yilmaz

Welcome to Wolfram Community! Please make sure you know the rules: https://wolfr.am/READ-1ST

The rules explain how to format your code properly. If you do not format code, it may become corrupted and useless to other members. Please EDIT your posts and make sure code blocks start on a new paragraph and look framed and colored like this.

int = Integrate[1/(x^3 - 1), x];
Map[Framed, int, Infinity]

enter image description here

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