let me preface by saying this is from a homework question, but the question is not to plot the decision boundary, just to train the model and do some predictions. I have already done that and my predictions seem to be correct.
But I would like to verify my results by plotting the decision boundary. This is not part of the homework.
The question was to take a simple dataset $$ X = \begin{bmatrix} -1&0&2&0&1&2\\ -1&1&0&-2&0&-1 \end{bmatrix} $$
$$ y = \begin{bmatrix} 1&1&1&-1&-1&-1 \end{bmatrix} $$
Given this, convert the input to non-linear functions: $$ z = \begin{bmatrix} x_1\\x_2\\x_1^2\\x_1x_2\\x_2^2 \end{bmatrix} $$
Then train the binary logistic regression model to determine parameters $\hat{w} = \begin{bmatrix} w\\b \end{bmatrix}$ using $\hat{z} = \begin{bmatrix} z\\1 \end{bmatrix}$
So, now assume that the model is trained and I have $\hat{w}^*$ and would like to plot my decision boundary $\hat{w}^{*T}\hat{z} = 0$
Currently to scatter the matrix I have
scatter(X(1,:), X(2,:))
axis([-1.5 2.5 -2.5 1.5])
hold on
% what do I do to plot the decision boundary?
Not sure where to go from here. I have tried using symbolic functions, but fplot doesn't like using 2 variables.

I could plot it using the following code:
Note that I needed to change the $y$ values to categorial values (internally, these are positive integers), since
mnrfitrequired this. But it has no influence on our decision problem.The result is: