I have a Gaussian random variable $z$, whose mean $\mu$ and variance $\sigma^2$ are functions of two variables $x$ and $y$. Is there any way in MATLAB so that I can find the values of $x$ and $y$ for which $P(z)$ = $N(z$;$\mu$$(x,y)$,$\sigma$$(x,y))$ is maximised for a given value of $z$? Thanks in advance.
$\begingroup$
$\endgroup$
4
-
$\begingroup$ I don't understand your writing. Could you rephrase it? $\endgroup$– RoyiCommented Apr 12, 2016 at 5:01
-
$\begingroup$ I have rephrased the question. Please have a look. $\endgroup$– Ajay AgarwalCommented Apr 12, 2016 at 8:48
-
1$\begingroup$ $P(z)$ is always maximum for $z=\mu$. You need to find $x,y$ such that $\mu(x,y)=z$. $\endgroup$– MBazCommented Apr 12, 2016 at 13:57
-
$\begingroup$ As @MBaz says, $P(z)$ will be maximized when $z = \mu(x,y),$ unless there are constraints on the values of $x$ and $y$ or on the function $\mu$ that mean $z = \mu(x,y)$ is impossible. Are there any other things about the problem that you're not telling us? $\endgroup$– Peter K. ♦Commented Apr 12, 2016 at 14:59
Add a comment
|
2 Answers
$\begingroup$
$\endgroup$
Try this:
[argvalue, argmin] = min(x);
[argvalue, argmax] = max(x);
Also, have a look to this question.