# \#maxima

**URL:** https://discourse.julialang.org/tag/maxima/524.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [How to maximize a scalar function of a scalar argument?](https://discourse.julialang.org/t/how-to-maximize-a-scalar-function-of-a-scalar-argument/115318)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 1\
**Last updated:** [June 7, 2024, 12:24pm UTC](https://discourse.julialang.org/t/how-to-maximize-a-scalar-function-of-a-scalar-argument/115318 "2024-06-07T12:24:53Z")

</div>

I want to maximize a scala function, say NMaximize\[{1/(x - 1), -10 \< x \< 0}, {x}\] I tried: module test using Optimization, OptimizationOptimJL, NonlinearSolve function f(x, p) return 1 / (x - 1) end u0 = -0.5 p …

---

## [Index of max values of N columns in a DataFrame without manually entering each column](https://discourse.julialang.org/t/index-of-max-values-of-n-columns-in-a-dataframe-without-manually-entering-each-column/92532)

<div class="topic-metadata">

**Author:** [@phantom](https://discourse.julialang.org/u/phantom)\
**Replies:** 15\
**Last updated:** [January 7, 2023, 9:08pm UTC](https://discourse.julialang.org/t/index-of-max-values-of-n-columns-in-a-dataframe-without-manually-entering-each-column/92532 "2023-01-07T21:08:14Z")

</div>

Hi pretty sure I’m overlooking something simple here but would appreciate some pointers. Suppose I have the following DataFrame df = DataFrame( idA = rand(-100:100,5), idB = rand(-100:100,5), C = rand(-100:100,5), idD …

---

## [How to return k largest elements of a vector in descending order?](https://discourse.julialang.org/t/how-to-return-k-largest-elements-of-a-vector-in-descending-order/89559)

<div class="topic-metadata">

**Author:** [@Alex\_ricci](https://discourse.julialang.org/u/Alex_ricci)\
**Replies:** 10\
**Last updated:** [November 1, 2022, 12:37pm UTC](https://discourse.julialang.org/t/how-to-return-k-largest-elements-of-a-vector-in-descending-order/89559 "2022-11-01T12:37:27Z")

</div>

Let’s say I have a vector a = rand(1:20, 10) 10-element Vector{Int64}: 2 13 10 12 10 8 10 14 1 19 I want to define a function such as f() which takes two inputs including a vector a and k as the number of …

---

## [Argmax() -\> vector of index result](https://discourse.julialang.org/t/argmax-vector-of-index-result/76532)

<div class="topic-metadata">

**Author:** [@BMval](https://discourse.julialang.org/u/BMval)\
**Replies:** 5\
**Last updated:** [February 16, 2022, 8:24am UTC](https://discourse.julialang.org/t/argmax-vector-of-index-result/76532 "2022-02-16T08:24:08Z")

</div>

What is the elegant solution for argmax? I was expecting that argmax just return indexes of maximum value, but it returns … … … (As it works in MATLAB for instance). am=argmax(randn(100,100,dims=2) mi=map(x-\>x\[2\],am) I…

---

## [Weave unable to execute Maxima.jl](https://discourse.julialang.org/t/weave-unable-to-execute-maxima-jl/49560)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 0\
**Last updated:** [November 4, 2020, 2:22am UTC](https://discourse.julialang.org/t/weave-unable-to-execute-maxima-jl/49560 "2020-11-04T02:22:05Z")

</div>

When I try to Weave a Julia Markdown with Maxima.jl, it ends up not starting. using Maxima It just stays on the first block of code.
