# Trying to use quadprog function from MathProgBase, has error "no method matching"

**URL:** <https://discourse.julialang.org/t/trying-to-use-quadprog-function-from-mathprogbase-has-error-no-method-matching/17831>\
**Category:** Optimization (Mathematical)\
**Tags:** jump\
**Created:** [November 21, 2018, 8:20pm UTC](https://discourse.julialang.org/t/trying-to-use-quadprog-function-from-mathprogbase-has-error-no-method-matching/17831 "2018-11-21T20:20:58Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [November 21, 2018, 10:14pm UTC](https://discourse.julialang.org/t/trying-to-use-quadprog-function-from-mathprogbase-has-error-no-method-matching/17831/2 "2018-11-21T22:14:19Z")

</div>

Hi there! Here is an example for how to use `quadprog` (Unless it’s super necessary, I recommend using JuMP directly over the lower-level MathProgBase; then you won’t have issues like this):

```julia
using MathProgBase, Ipopt
c = [0, 0] # Vector
Q = [1 0; 0 1] # Matrix
A = [1 1] # Matrix
sense = ['='] # Vector
b = [1] # Vector
l = [0, 0] # Vector
u = [1, 1] # Vector

MathProgBase.quadprog(c, Q, A, sense, b, l, u, Ipopt.IpoptSolver())

```

You should also have a read of:

> [@Please read: make it easier to help you](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757):
>
> Welcome to the Julia Discourse! We are enthusiastic about helping Julia programmers, both beginner and experienced. This public service announcement (PSA) outlines best practices when asking for help. Following these points makes it easier for us to help you and more likely you’ll get a prompt, useful answer. Keywords are highlighted to make it easier to refer to specific points. Choose a descriptive title that captures the key part of your question, eg “plots with multiple axes” instead of …

---

_[View the full topic](https://discourse.julialang.org/t/trying-to-use-quadprog-function-from-mathprogbase-has-error-no-method-matching/17831)._
