<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hello Masahiro,<br>
<br>
<pre style="font-family:Monospaced;font-style:normal;font-size:12.0;"><span style="color:rgb(176,24,19);">> function</span> <span style="color:rgb(131,67,16);font-weight:bold;">rt</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(0,0,0);text-decoration:underline;">multNormDensFunc</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(131,67,16);font-weight:bold;">x_V</span><span style="color:rgb(0,0,0);">, </span><span style="color:rgb(131,67,16);font-weight:bold;">m_V</span><span style="color:rgb(0,0,0);">, </span><span style="color:rgb(131,67,16);font-weight:bold;">cov_M</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span></pre>
I am not sure about the semi-colon... ?<br>
<br>
<pre style="font-family:Monospaced;font-style:normal;font-size:12.0;"><span style="color:rgb(74,85,219);">> [</span><span style="color:rgb(0,0,0);">I2</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(0,0,0);">e</span><span style="color:rgb(74,85,219);">]</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(50,185,185);">int2d</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">X</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(0,0,0);">Y</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(50,185,185);">list</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">multNormDensFunc</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(74,85,219);">[</span><span style="color:rgb(188,143,143);">0</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">0</span><span style="color:rgb(74,85,219);">]</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(74,85,219);">[</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">0</span><span style="color:rgb(0,0,0);">;</span><span style="color:rgb(188,143,143);">0</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(74,85,219);">]</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(74,85,219);">[</span><span style="color:rgb(188,143,143);">0.0001</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(188,143,143);">1</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(188,143,143);">20</span><span style="color:rgb(92,92,92);">*</span><span style="color:rgb(188,143,143);">20</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(188,143,143);">4000</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(188,143,143);">0</span><span style="color:rgb(74,85,219);">]</span><span style="color:rgb(74,85,219);">)
</span></pre>
The function expects only one parameter after both 2D operands
x_V, m_V, while the list provides 2 parameters.<br>
So either the function is missing a y_V, or the list has an extra
parameter.<br>
I don't know how int2d() manages this.<br>
<br>
In practical, int2d() needs mesh2d() to build and feed its X and Y
arguments.<br>
While mesh2d() is still an external function in the Metanet
module, <br>
that is not Scilab 6 - ready:
<a class="moz-txt-link-freetext" href="https://atoms.scilab.org/toolboxes/metanet">https://atoms.scilab.org/toolboxes/metanet</a><br>
...<br>
However, mesh_2() from the CGLAB module
<a class="moz-txt-link-freetext" href="https://atoms.scilab.org/toolboxes/cglab">https://atoms.scilab.org/toolboxes/cglab</a><br>
should also be able to do the job (hoping that the output is
int2d() compatible).<br>
<br>
These tools should be inside Scilab, or int2d() outsite :<br>
<a class="moz-txt-link-freetext" href="http://bugzilla.scilab.org/8284">http://bugzilla.scilab.org/8284</a><br>
<br>
For int3d(), it is even worse. I am not sure there is any mesh3d()
available at all anywhere for Scilab.<br>
<br>
Samuel<span style="color:rgb(74,85,219);"><br>
</span><br>
Le 28/02/2018 à 23:17, fujimoto2005 a écrit :<br>
</div>
<blockquote cite="mid:1519856231321-0.post@n3.nabble.com"
type="cite">
<pre wrap="">In order to calculate the expected value of a certain two-variable function,
I have created a density function of two-dimensional normal distribution.
I created a code like the attached file to check the correctness of the
function, but it does not work.
Where is the code wrong?
I have been confirmed int2D supports list format for a function call.
Furthermore running the code doesn't show "called multNormDensFunc1".
This means it fails to call "multNormDensFunc" function.
Best regards.
test_multNorm.sce
<a class="moz-txt-link-rfc2396E" href="http://mailinglists.scilab.org/file/t497065/test_multNorm.sce"><http://mailinglists.scilab.org/file/t497065/test_multNorm.sce></a>
--
Sent from: <a class="moz-txt-link-freetext" href="http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html">http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html</a>
_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<p><br>
</p>
</body>
</html>