MATLAB Answers

Is it possible to write argmin in the equation for MATLAB live script ?

3 views (last 30 days)
Thanacha Choopojcharoen
Thanacha Choopojcharoen on 16 Feb 2020
Edited: Walter Roberson on 16 Feb 2020
Is it possible to write argmin in the equation for MATLAB live script ? I've been trying to write an exercise in the script. If there isn't any way to do, may I highly suggest this for the next release ?
Thank you.

  1 Comment

Walter Roberson
Walter Roberson on 16 Feb 2020
Note that the first few releases of Live Script did not permit pure functions to be defined in Live Script, but that current versions do permit Live Script to be pure function definitions that can be called by other routines.

Sign in to comment.

Answers (1)

Steven Lord
Steven Lord on 16 Feb 2020
What specifically do you mean when you say argmin?
Do you mean the location of the minimum element in a vector? See the second output of the min function.
Do you mean the number of inputs with which the live function was called? I believe nargin and narginchk both work inside a live function.
Do you mean a value that minimizes the live function? Call fminsearch or fmincon with a handle to your live function as input.
If you mean something else, please clarify.

  0 Comments

Sign in to comment.

Sign in to answer this question.