OptimizationProblem.solve — Solve continuous or integer affine, least-squares, quadratic and nonlinear models with original variable and constraint outputs.
Solve OptimizationProblem and EquationProblem models with a compatible algebraic or local nonlinear solver. Solution fields, objective or equation-residual values and supported multiplier arrays retain their original model shapes and units.
Syntax
sol = solve(problem[,x0],Name,Value,...)
[sol,fval] = solve(problem[,x0],Name,Value,...)
[sol,fval,exitflag] = solve(problem[,x0],Name,Value,...)
[sol,fval,exitflag,output] = solve(problem[,x0],Name,Value,...)
[sol,fval,exitflag,output,lambda] = solve(problem[,x0],Name,Value,...)Inputs
problem- Type
Any- Required
- Yes
- Default
- —
- Description
- Original optimization or equation problem.
x0- Type
Any- Required
- No
- Default
- —
- Description
- Original variable-name starting-point struct. It is consumed as an integer repair proposal or required nonlinear start; residual/quadratic interior-point paths do not use it.
controls- Type
Any- Required
- Variadic
- Default
- —
- Description
- Solver and Options name/value pairs.
Returns
sol- Type
Any- Description
- Original variable-name structure; each successful variable retains its original shape. Without a point, variable fields are [].
fval- Type
Any- Description
- Original objective value at sol, or original equation-shaped residuals for an EquationProblem.
exitflag- Type
Any- Description
- OptimizationExitflag enumeration with double and string conversions.
output- Type
Any- Description
- Solver iteration, feasibility, duality, algorithm, message and selected solver information.
lambda- Type
Any- Description
- Original Variables Lower/Upper and Constraints multipliers; unavailable multiplier fields are []. A selected integer solver returns []. Equation problems do not return this fifth output.
Errors
RunMat:OptimProblem:InvalidInput- When
- Invalid property, collection, objective sense, name collision, or native property path.
- Message
invalid optimization problem
RunMat:OptimProblem:NumericalUnverified- When
- A working-model terminal cannot be verified against the original model.
- Message
original model numerical evidence is unverified
Calls and model form
Use sol=solve(problem), or request [sol,fval,exitflag,output,lambda]. Solver and Options name/value pairs select the compatible solver and its actual option structure. Affine models with integer variables select intlinprog; continuous affine models select linprog; recognized nonconstant sums of squared affine residuals select lsqlin. Variable-independent squared objectives retain the affine feasibility solver for either objective sense. Options accepts [] or the selected solver's optimoptions structure. General quadratic objectives select quadprog. An explicit quadprog selection also accepts compatible affine and linear least-squares objectives. The continuous algebraic solvers honor a zero iteration limit. A supported scalar model outside those algebraic forms selects fminunc when it has no bounds or comparison constraints, and fmincon otherwise. Explicit Solver='fmincon' or Solver='fminunc' selects the compatible local scalar solver even for an algebraic objective.
The objective can be a scalar expression, one named scalar objective, or an empty objective for feasibility. ObjectiveSense selects minimization or maximization. Variables can have original numeric or named N-dimensional shapes and finite or infinite bounds. Linear equality and inequality arrays can be named or unnamed; their <=, >= or == comparison is preserved.
Affine expressions support real constants, indexing, indexed assignment, concatenation, transpose, reshape, addition and subtraction, scalar constant division, matrix or elementwise products with at most one variable-dependent factor in each contributing term, sum and mean reductions, trace, diag, diff, dot, and forward or reverse cumulative sums and products. Dependence follows original array rows, not cancelled floating coefficients.
Product reductions and cumulative products require at most one variable-dependent factor per output. Integer powers of constant arrays and matrices are supported, including negative powers when the original constant is invertible. Variable-dependent bases support zero and identity powers. Computed exponents are checked against their original exact constant expression; a rounded value of zero or one is not sufficient evidence.
Mean uses the numerical mean function's dimension, missing-value and constant-weight controls. Reductions and diagonal mappings preserve the original array shapes. Every selected expression operand must be fully assigned; missing expression slots are not replaced by zeros.
Linear least squares
A minimized scalar objective can combine scalar numeric constants, positive scalar multiples or divisors, and nested sum reductions of squared affine expressions. Elementwise squares use .^2; norm(r)^2 denotes the squared Euclidean scalar/vector norm. Default or numeric-two matrix norms are spectral and are not interpreted as sums of entrywise squares. Residual expressions can retain their original named or numeric array shapes. The original constraints and bounds must be affine and continuous.
Positive factors weight squared residuals. The sparse residual formulation does not form normal equations. fval is the original complete objective, including scalar constants, rather than the raw lsqlin half-squared objective. Multipliers use the original full squared-objective units and original constraint directions.
solve(problem,x0,...) accepts an original variable-name starting-point structure for the least-squares and quadratic families. Interior-point does not inspect x0 fields or convert them into a numerical seed. Bound-reflective least squares reads matching variable fields in their original shapes after controls are prepared, then adjusts off-bound values into the interior. Raw lsqlin has its own starting-point and inconsistent-bound output rules. Interior-point, reflective and quadratic points pass original feasibility checks; without a verified point, solution fields and fval are []. Active-set least squares instead retains evaluated-only stopped candidates as described below.
Active-set least squares requires an original-name x0 structure, uses its dense original-coordinate data in feasible working-set iterations, and reads the active raw lsqlin controls. A stopped candidate is returned in its original variable shapes with the original objective when evaluable, even if iteration exhaustion left it infeasible. These values are evaluated-only: they do not populate the feasible-point cache or supply multipliers. IllConditioned (-4) and NoDescentDirectionFound (-8) retain numerical stopping reasons. A feasible ObjectiveLimit stop is exposed as the RunMat member ObjectiveLimitReached (-3), distinct from a certified Unbounded result. The threshold is tested on the original complete objective, including constants and weights.
The lsqlin profile selects interior-point, bound-only trust-region-reflective, or active-set. Linear constraint rows select interior-point, even when reflective is requested. Reflective supports the same CG and scaling controls as raw lsqlin, with full squared-objective gradient and multiplier units. OptimalSolution requires the independent original-model KKT check. FunctionChangeBelowTolerance (3) instead retains an original-source evaluated feasible point and the actual function-change stopping reason; it does not assert stationarity or publish optimal multipliers. General quadratic syntax such as r'*r is not reclassified as a least-squares residual form.
Quadratic objectives
The quadratic compiler supports real scalar objectives assembled from affine terms, scalar and elementwise squares, matrix/elementwise products, scalar constant division, indexing and edits, transpose, reshape, concatenation, supported linear reductions, dot, differences and cumulative operations. Each contributing product has degree at most two. Sparse constant matrix factors retain their original CSC backing; no dense copy is required.
The interior-point-convex solver minimizes convex quadratic objectives and maximizes concave ones. Signed squared affine residuals and scalar/vector Euclidean norm squares can be mixed with affine terms. A Euclidean norm-square pair is treated as a single quadratic operation; the norm itself is not a polynomial operand. A matrix spectral norm square is not a general quadratic form. Unsupported expression functions and powers are not converted into a quadratic approximation.
Options consumes the quadprog profile: Algorithm='interior-point-convex', Display, MaxIterations, OptimalityTolerance and ConstraintTolerance with their existing aliases. Other quadratic algorithms are unavailable. A supplied starting-point struct is retained but inactive for this algorithm. Positive minimized residual syntax continues to select lsqlin unless Solver='quadprog' is explicitly requested.
An exact original-curvature rejection returns Nonconvex (-6). If the original objective is convex but rounded working coefficients cannot support the numerical solve or its terminal checks, the call raises NumericalUnverified. Returned fval is evaluated from the original objective, including constants and maximization; it is never substituted with the constant-free numerical quadratic cost.
Nonlinear models
Use solve(problem,x0,...) for scalar continuous nonlinear objectives or constraints. x0 is a structure with one original-name field for each variable, in its original shape. All selected fields are checked before conversion. Values must be real and finite; the original variable bounds remain separate from x0. A starting point is required for this solver family.
fmincon supports its interior-point default, sqp and active-set algorithms. The original expression DAG supplies the objective and directed constraint residuals at each requested point. Affine rows used by this nonlinear path retain their original comparison and shape rather than being replaced by a penalty. Empty objectives select feasibility, and maximization negates only the solver objective.
Options uses the fmincon profile: Algorithm, Display, MaxIterations, MaxFunctionEvaluations, OptimalityTolerance, ConstraintTolerance, StepTolerance, FiniteDifferenceType, FiniteDifferenceStepSize, TypicalX and OutputFcn, with applicable existing aliases. Derivatives are numerical. Supplied objective or constraint gradients, Hessian callbacks or patterns, and trust-region-reflective are unavailable for this modeled consumer. Unsupported derivative declarations are rejected before starting-point conversion or model evaluation.
The existing solver owns trial acceptance, bound-aware differences, restoration, observers and stopping. OutputFcn receives its numeric column vector in original-name and column-major coordinate order. A full model probe and a constraints-only derivative probe share its point budget; constraints-only probes do not evaluate the objective. Nonreal or nonfinite numerical trial values can cause trial rejection. Cancellation, model errors and runtime failures propagate without retrying the model as a numerical undefined value.
The returned nonlinear solution is the actual stopped iterate and can be infeasible. fval is its retained original objective value, or [] when no objective evaluation completed. A zero evaluation limit returns the initial solver iterate, fval=[] and SolverLimitExceeded. Convergence and infeasibility messages describe the local constrained algorithm, not a global minimum or global infeasibility certificate.
Nonlinear least-squares models
A recognized minimized sum of positive weighted squared nonlinear residuals selects lsqnonlin when the model has only variable bounds. Supply a starting-point structure containing the original variable names and shapes. Residual rows follow the original term order and column-major array order; solver probes evaluate the retained expression graph.
The returned fval is the original scalar objective, including additive constants, not the solver's residual norm. The solution retains all original variable fields and shapes. output.Solver identifies lsqnonlin; its iteration and function counts include the residual and finite-difference probes that were evaluated. Final derivative probes do not replace the accepted solution point.
With MaxFunctionEvaluations=0, RunMat returns the bound-projected supplied variable fields without evaluating the original graph. fval is NaN, the limit flag and function count are zero, and multipliers are empty. The information identifies not-started and not-evaluated rather than an accepted numerical point.
Explicit lsqnonlin selection rejects comparison constraints before residual work. A constrained residual model can still use the scalar fmincon route, with those constraints preserved. Options must belong to the selected solver; an incompatible options profile is not reinterpreted. Least-squares solvers do not maximize, and integer or semi domains are not relaxed.
The residual kernel currently uses damped Levenberg-Marquardt steps. Both accepted raw algorithm selectors currently reach this kernel; a separate trust-region-reflective residual mechanism is not yet available. Use Algorithm='levenberg-marquardt' to identify the implemented mechanism explicitly.
Local convergence flags describe the numerical stopping condition, not a global minimum certificate. The original objective and residuals must be finite and real at evaluated points. Operational errors and cancellation propagate without replacement residuals or a retry of completed work. Bound multipliers use the full original squared-objective units; unavailable final derivatives leave the multiplier fields empty rather than inventing zero derivatives.
Unconstrained nonlinear models
General scalar continuous nonlinear models without bounds or comparison constraints select fminunc. Explicit Solver='fminunc' requires this same geometry and does not discard bounds, comparisons or integer domains. A starting-point structure supplies each original variable in its original shape; returned solution fields preserve those shapes.
This consumer uses the fminunc quasi-Newton controller, including BFGS, limited-memory BFGS, and the applicable legacy update controls. The original expression DAG supplies scalar objective values; finite differences use the shared forward/central refinement policy, selected step sizes and TypicalX. Maximization changes only the solver objective sign, and fval remains the original objective.
Options uses the fminunc profile and its actual function/iteration limits, tolerances, Display and OutputFcn controls. Supplied gradients and modeled parallel derivatives are unavailable and are rejected before starting-point conversion. Requesting trust-region without supplied gradients selects quasi-Newton with the same warning as fminunc; inactive trust-region controls are not inspected. Model evaluation errors and nonfinite or nonreal objective values follow the raw fminunc error policy, rather than being replaced by artificial trial values.
output reports iterations, funcCount, firstorderopt, stepsize, algorithm, message, Solver and objectivederivative='finite-differences'. This information does not read Clock. lambda is []. ObjectiveLimit stops at the evaluated threshold-crossing iterate; its public Unbounded (-3) exitflag is a threshold-stop projection, not a mathematical unboundedness certificate. The message identifies the threshold condition.
Integer affine models
Declare an integer variable with optimvar(...,'Type','integer',...). Its full original definition, bounds, named dimensions and column-major elements remain in the solve layout, including coordinates whose objective coefficients cancel. The numerical solver orders variable definitions alphabetically by name. Type='semi-continuous' and Type='semi-integer' select zero-or-active-interval domains. Both active bounds must lie in (0,1e5]; zero remains admissible despite a positive active lower bound. Semi-integer active values must be integral. Mixed continuous/discrete affine constraints and objectives select intlinprog; Solver='intlinprog' can also select a compatible continuous affine model. A quadratic or nonlinear model with integer variables is not solved by dropping its integer domains.
A starting-point struct supplies finite values in each original variable shape. It is a repair proposal: the existing integer solver can fix proposed integer values and solve the remaining linear feasibility problem. A rounded proposal is not an incumbent until original feasibility and integrality are verified. Omitted x0 does not create a fabricated initial solution.
The intlinprog options profile consumes AbsoluteGapTolerance, RelativeGapTolerance, ConstraintTolerance, MaxNodes, MaxFeasiblePoints, MaxTime, ObjectiveCutOff, Display, OutputFcn and PlotFcn. Limits, integer-class controls and callback cells retain the same validation as intlinprog. MaxTime uses the selected original Clock during the numerical invocation; it is a cooperative limit, not a hard-preemption guarantee.
Incumbents, pruning bounds and terminal certificates use the original affine expressions and the current branch bounds, not only rounded CSC coefficients. A nonzero stationarity correction without a finite bound supplies no pruning bound. A relaxation ray alone does not establish integer unboundedness. Unrepresentable branch thresholds leave an unresolved numerical stop rather than an artificial variable-domain cap.
Gap, cutoff, certifiedobjective and lowerbound values use the full minimization-oriented original objective: f for minimization and -f for maximization, including its constant. Output/plot callbacks use these same objective units and a flat column vector in the solver ordering; a nonempty callback x represents a newly improving integer-feasible solution. The returned solve fval is always the original f(sol). Exact proof gaps need not equal a subtraction of rounded displayed values.
Integer results return the original named solution structure, fval, a typed exit flag and the integer solver's gap/node/feasible-point information. A stopped feasible point is IntegerFeasible (2); an observer stop is OutputFcnStop (-1). Loss of binary64 publication feasibility is FeasibilityLost (-9). A selected integer solver returns [] for lambda, never the duals of one LP relaxation.
Results and numerical checks
sol is a structure with a field for each original variable. Accepted variable values retain their original shapes. If no point is returned, these fields are []. fval is the original objective evaluated at sol, including its constant and maximization sense. It is [] without a point or objective. A single named objective still returns its scalar value.
exitflag is an OptimizationExitflag enumeration. double(exitflag) returns its numeric equivalent and string(exitflag) its member name. Supported solver terminations are OptimalSolution (1), SolverLimitExceeded (0), NoFeasiblePointFound (-2), Unbounded (-3), quadratic Nonconvex (-6), and nonlinear StepSizeBelowTolerance (2), FunctionChangeBelowTolerance (3) and OutputFcnStop (-1). An unverified continuous numerical terminal raises RunMat:OptimProblem:NumericalUnverified. Integer numerical stops retain a verified incumbent when available and otherwise report no feasible point; they do not certify infeasibility or unboundedness.
output retains the selected solver's iteration, feasibility, stationarity, duality, algorithm and message fields. Solver identifies linprog, lsqlin, quadprog, fmincon, fminunc or intlinprog. Numerical residual, quadratic and nonlinear intervals report wallclocktime, excluding model construction and compilation; interior-point lsqlin also reports linearsolver. Its normalized numerical residuals describe the selected residual solver. The original floating expression DAG is evaluated at a proposed point, and original-model stationarity and complementarity are checked independently. An algebraic terminal of infeasibility or unboundedness requires exact original-domain evidence rather than only the rounded assembled matrix.
For fminunc and intlinprog, lambda is []. For constrained continuous solvers, lambda.Variables.<name>.Lower and .Upper retain the variable's original shape. Named lambda.Constraints.<name> arrays retain each original constraint shape; an unnamed constraint array is returned directly in lambda.Constraints. Multiplier fields are [] when verified optimal multipliers are unavailable. A small numerical stationarity residual is not an exact equality certificate.
Equation problems
solve also accepts an EquationProblem created by eqnproblem. Its Equations are residual expressions, not hard optimization constraints. Defaults are lsqlin for affine equations, fzero for one unbounded scalar nonlinear equation, fsolve for an unbounded nonlinear system, and lsqnonlin when nonlinear equation variables have bounds. Solver can select one of those compatible controllers; Options must belong to that solver.
Equation solving returns at most [sol,fval,exitflag,output], with no lambda. A single equation entry, including one named entry, returns its left-minus-right residual array in the original shape. Multiple named entries return a same-name structure of residual arrays. Equation success is reported as EquationSolved. Least-squares equation solving also checks the selected residual tolerance; residuals outside that tolerance produce NoFeasiblePointFound, meaning that no root was found, not proof that no root exists. Nonlinear starts are original variable-name and shape structures.
Equation controllers reuse the original model evaluator and selected raw solver. fzero retains the evaluated bracket sample that it returns, without a final reevaluation. Finite-difference residual solvers retain their accepted original point and actual evaluation counts. The equation information output requires the original Clock service. Automatic EquationDerivative controls, model DAG transport and global/multiple-start equation forms remain unsupported.
Services and remaining forms
Execution uses the original invocation context and cancellation generation. Sparse matrices are assembled from active coordinates without a dense global coefficient array per expression node. Numerical kernels, exact checks and model traversal cooperate with cancellation. Display uses the original console, diary and host forwarding services. Observing lsqlin, quadprog or fmincon output information requires the original Clock service; these continuous calls with fewer than four model outputs do not read it. Integer solving requires the original Clock even without requested information.
Model compilation, exact-proof scratch and sparse solver factorization do not have complete finite-memory certificates, so solve refuses finite host-memory policies before allocating its compiler or solver workspace. Model transport and remaining reflection interfaces are unsupported.
Noninteger powers and symbolic irrational constant expressions are not converted into algebraic coefficient proofs. Supported numerical expression nodes can instead use a local nonlinear solver with a starting point. Within general quadratic syntax, variable matrix powers support zero, identity and square; more general constant-power subexpressions can be computed before constructing the model. A numeric irrational approximation computed before entering the model is an ordinary finite double constant. Mixed-integer quadratic/nonlinear and multiple-objective model solver selection remain unavailable, as do multistart/global solver arguments, derivative-selection parameters, prob2struct and OptimizationValues. A linprog starting point is not consumed by this model interface. An explicitly selected incompatible solver is rejected; no alternative solver or fixed penalty is substituted.
Using OptimizationProblem.solve with coding agents
Open a RunMat example with live inputs, then ask the agent to explain how OptimizationProblem.solve changes the result.
Run a small OptimizationProblem.solve example, explain the result, then change one input and compare the output.
Related Math functions
Optim
acceptancesa · annealingboltz · annealingfast · coneprog · crossoverarithmetic · crossoverheuristic · crossoverintermediate · crossoverlaplace · crossoverscattered · crossoversinglepoint · crossovertwopoint · eqnproblem · EquationProblem.solve · EquationProblem.subsasgn · EquationProblem.subsref · evaluate · fgoalattain · fitscalingprop · fitscalingrank · fitscalingshiftlinear · fitscalingtop · fminbnd · fmincon · fminimax · fminsearch · fminunc · fseminf · fsolve · fzero · ga · gacreationlinearfeasible · gacreationnonlinearfeasible · gacreationsobol · gacreationuniform · gacreationuniformint · gaplotbestf · gaplotbestindiv · gaplotdistance · gaplotexpectation · gaplotgenealogy · gaplotmaxconstr · gaplotrange · gaplotscorediversity · gaplotscores · gaplotselection · gaplotstopping · integerConstraint · integral · intlinprog · linprog · lsqcurvefit · lsqlin · LsqlinWarmStart.subsasgn · LsqlinWarmStart.subsref · lsqnonlin · lsqnonneg · mutationadaptfeasible · mutationgaussian · mutationpositivebasis · mutationpower · mutationuniform · optimexpr · optimget · OptimizationConstraint.evaluate · OptimizationConstraint.subsasgn · OptimizationConstraint.subsref · OptimizationExitflag.double · OptimizationExitflag.eq · OptimizationExitflag.ne · OptimizationExitflag.string · OptimizationExpression.acos · OptimizationExpression.acosh · OptimizationExpression.acot · OptimizationExpression.acoth · OptimizationExpression.acsc · OptimizationExpression.acsch · OptimizationExpression.asec · OptimizationExpression.asech · OptimizationExpression.asin · OptimizationExpression.asinh · OptimizationExpression.atan · OptimizationExpression.atanh · OptimizationExpression.cat · OptimizationExpression.cos · OptimizationExpression.cosh · OptimizationExpression.cot · OptimizationExpression.coth · OptimizationExpression.csc · OptimizationExpression.csch · OptimizationExpression.ctranspose · OptimizationExpression.cumprod · OptimizationExpression.cumsum · OptimizationExpression.diag · OptimizationExpression.diff · OptimizationExpression.dot · OptimizationExpression.eq · OptimizationExpression.evaluate · OptimizationExpression.exp · OptimizationExpression.ge · OptimizationExpression.horzcat · OptimizationExpression.ldivide · OptimizationExpression.le · OptimizationExpression.log · OptimizationExpression.mean · OptimizationExpression.minus · OptimizationExpression.mldivide · OptimizationExpression.mpower · OptimizationExpression.mrdivide · OptimizationExpression.mtimes · OptimizationExpression.norm · OptimizationExpression.plus · OptimizationExpression.power · OptimizationExpression.prod · OptimizationExpression.rdivide · OptimizationExpression.reshape · OptimizationExpression.sec · OptimizationExpression.sech · OptimizationExpression.sin · OptimizationExpression.sinh · OptimizationExpression.sqrt · OptimizationExpression.subsasgn · OptimizationExpression.subsref · OptimizationExpression.sum · OptimizationExpression.tan · OptimizationExpression.tanh · OptimizationExpression.times · OptimizationExpression.trace · OptimizationExpression.transpose · OptimizationExpression.uminus · OptimizationExpression.uplus · OptimizationExpression.vertcat · OptimizationExpression.zeros · OptimizationExpression.zerosLike · OptimizationProblem.subsasgn · OptimizationProblem.subsref · OptimizationVariable.subsasgn · OptimizationVariable.subsref · optimoptions · optimplotconstrviolation · optimplotfirstorderopt · optimplotfunccount · optimplotfval · optimplotfvalconstr · optimplotmilp · optimplotstepsize · optimplotx · optimproblem · optimset · optimvar · optimwarmstart · particleswarm · patternsearch · psplotbestf · psplotbestx · psplotfuncount · psplotmaxconstr · psplotmeshsize · pswcreationuniform · pswplotbestf · quad · quadprog · QuadprogWarmStart.subsasgn · QuadprogWarmStart.subsref · saplotbestf · saplotbestx · saplotf · saplotstopping · saplottemperature · saplotx · savemilpsolutions · secondordercone · selectionremainder · selectionroulette · selectionstochunif · selectiontournament · selectionuniform · simulannealbnd · solve · surrogateopt · surrogateoptplot · temperatureboltz · temperatureexp · temperaturefast
Elementwise
abs · angle · besselj · bsxfun · complex · conj · double · eps · erf · erfcinv · exp · expm1 · flintmax · gamma · gammaln · heaviside · hypot · imag · int16 · int32 · int64 · int8 · intmax · intmin · ldivide · log · log10 · log1p · log2 · minus · nextpow2 · plus · pow2 · power · rdivide · real · realmax · realmin · realsqrt · rescale · sign · single · sqrt · times · typecast · uint16 · uint32 · uint64 · uint8
Trigonometry
acos · acosd · acosh · acotd · acscd · asecd · asin · asind · asinh · atan · atan2 · atan2d · atand · atanh · cos · cosd · cosh · cospi · deg2rad · pol2cart · rad2deg · sin · sind · sinh · sinpi · tan · tand · tanh
Reduction
all · any · bounds · cummax · cummin · cumprod · cumsum · cumtrapz · diff · gradient · max · maxk · mean · median · min · mink · movmax · movmean · movmedian · movmin · movprod · movstd · movsum · movvar · nnz · prod · rms · std · sum · trapz · var
Structure
bandwidth · isdiag · ishermitian · issymmetric · istril · istriu · symrcm
Signal
blackman · butter · buttord · cheb2ord · conv · conv2 · deconv · downsample · envelope · filter · filtfilt · fir1 · freqz · gauspuls · hamming · hann · hilbert · periodogram · pulstran · pwelch · rectpuls · resample · sawtooth · sinc · spectrogram · square · tripuls · unwrap · upsample · zplane
Factor
chol · decomposition · decomposition.ctranspose · decomposition.mldivide · decomposition.mrdivide · decomposition.mtimes · decomposition.rdivide · decomposition.subsref · decomposition.times · decomposition.uminus · decomposition.uplus · eig · eigs · gmres · ichol · ilu · lu · ordeig · ordqz · ordschur · pcg · qr · qz · rsf2csf · schur · svd
Ops
cross · ctranspose · dot · mldivide · mpower · mrdivide · mtimes · pagemtimes · pagetranspose · trace · transpose
Interpolation
griddedInterpolant · griddedInterpolant.subsref · interp1 · interp1q · interp2 · pchip · ppval · spline
Integer Division
Source you can read
Every RunMat function's source is public. Read exactly how OptimizationProblem.solve is executed, line by line, in Rust.
- View the source for OptimizationProblem.solve in Rust on GitHub
- Learn how the RunMat runtime works
- Found a bug? Open an issue with a minimal reproduction.
About RunMat
RunMat is a runtime that executes MATLAB-syntax code fast on any GPU. The runtime is free for individuals, including freelancers; students and faculty at an academic institution, for teaching or research there; contributors to an open-source project, for work on that project; organizations with 250 or fewer people and US$10M or less in annual revenue; and anyone, for non-production use. See runmat.com/license.
- RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
- Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.