Hi guys,(adsbygoogle = window.adsbygoogle || []).push({});

I think this is a simple question for mathematica experts.

How can I maximize the extracted value from a list given a index that has to respect some constrains?

For example:

S = {4,2,3,5}

Maximize[{Extract[S,x], x<= 3, x>=1},{x}]

I would like 4 is returned instead of this error:

Extract::psl: "Position specification x in Extract[{4,2,3,5},x] is not an integer or a list of integers."

Does someone know like solve this?

Thanks a lot.

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Mathematica maximize element extraction from list

Loading...

Similar Threads for Mathematica maximize element |
---|

Mathematica Storing Mathematica output |

Mathematica Mathematica to MATLAB |

Mathematica Cannot do the integral of the Hyper-geometric function? |

Mathematica Cannot Plot This Function in Mathematica |

Mathematica While Loop in Mathematica |

**Physics Forums | Science Articles, Homework Help, Discussion**