<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="margin: 0px; font-family: Times; color: rgb(176, 24, 18); -webkit-text-stroke-color: rgb(176, 24, 18); -webkit-text-stroke-width: initial;" class="">hi</div><div style="margin: 0px; font-family: Times; color: rgb(176, 24, 18); -webkit-text-stroke-color: rgb(176, 24, 18); -webkit-text-stroke-width: initial;" class="">i am not very ease with scilab but i have to help some stundents of mine on that topic</div><div style="margin: 0px; font-family: Times; color: rgb(176, 24, 18); -webkit-text-stroke-color: rgb(176, 24, 18); -webkit-text-stroke-width: initial;" class="">i thought that applying any function on a matrix would apply affect every item of that matrix</div><div style="margin: 0px; font-family: Times; color: rgb(176, 24, 18); -webkit-text-stroke-color: rgb(176, 24, 18); -webkit-text-stroke-width: initial;" class="">example sqrt(A) would that the sqrt of each aij of A</div><div style="margin: 0px; font-family: Times; color: rgb(176, 24, 18); -webkit-text-stroke-color: rgb(176, 24, 18); -webkit-text-stroke-width: initial;" class="">in this logic i wanted to simulate a binomial law by creating this bernoulli function :</div><div style="margin: 0px; font-family: Times; color: rgb(176, 24, 18); -webkit-text-stroke-color: rgb(176, 24, 18); -webkit-text-stroke-width: initial;" class=""><br class=""></div><div style="margin: 0px; font-family: Times; color: rgb(176, 24, 18); -webkit-text-stroke-color: rgb(176, 24, 18); -webkit-text-stroke-width: initial;" class="">function<span style="color: rgb(0, 0, 0); -webkit-text-stroke-color: rgb(0, 0, 0);" class=""> </span><span style="color: rgb(131, 67, 15); -webkit-text-stroke-color: rgb(131, 67, 15);" class=""><b class="">xp</b></span><span style="color: rgb(92, 92, 92); -webkit-text-stroke-color: rgb(92, 92, 92);" class="">=</span><span style="text-decoration: underline; color: rgb(0, 0, 0); -webkit-text-stroke-color: rgb(0, 0, 0);" class="">f</span><span style="color: rgb(74, 85, 219); -webkit-text-stroke-color: rgb(74, 85, 219);" class="">(</span><span style="color: rgb(131, 67, 15); -webkit-text-stroke-color: rgb(131, 67, 15);" class=""><b class="">x</b></span><span style="color: rgb(0, 0, 0); -webkit-text-stroke-color: rgb(0, 0, 0);" class="">, </span><span style="color: rgb(131, 67, 15); -webkit-text-stroke-color: rgb(131, 67, 15);" class=""><b class="">p</b></span><span style="color: rgb(74, 85, 219); -webkit-text-stroke-color: rgb(74, 85, 219);" class="">)</span></div><div style="margin: 0px; font-family: Times; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""> <span style="color: rgb(160, 52, 240); -webkit-text-stroke-color: rgb(160, 52, 240);" class="">if</span> <span style="color: rgb(131, 67, 15); -webkit-text-stroke-color: rgb(131, 67, 15);" class=""><b class="">x</b></span><span style="color: rgb(92, 92, 92); -webkit-text-stroke-color: rgb(92, 92, 92);" class=""><</span><span style="color: rgb(131, 67, 15); -webkit-text-stroke-color: rgb(131, 67, 15);" class=""><b class="">p</b></span> </div><div style="margin: 0px; font-family: Times; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""> <span style="color: rgb(160, 52, 240); -webkit-text-stroke-color: rgb(160, 52, 240);" class="">then</span> <span style="color: rgb(131, 67, 15); -webkit-text-stroke-color: rgb(131, 67, 15);" class=""><b class="">xp</b></span><span style="color: rgb(92, 92, 92); -webkit-text-stroke-color: rgb(92, 92, 92);" class="">=</span><span style="color: rgb(188, 143, 143); -webkit-text-stroke-color: rgb(188, 143, 143);" class="">1</span></div><div style="margin: 0px; font-family: Times; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""> <span style="color: rgb(160, 52, 240); -webkit-text-stroke-color: rgb(160, 52, 240);" class="">else</span> <span style="color: rgb(131, 67, 15); -webkit-text-stroke-color: rgb(131, 67, 15);" class=""><b class="">xp</b></span><span style="color: rgb(92, 92, 92); -webkit-text-stroke-color: rgb(92, 92, 92);" class="">=</span><span style="color: rgb(188, 143, 143); -webkit-text-stroke-color: rgb(188, 143, 143);" class="">0</span> </div><div style="margin: 0px; font-family: Times; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""> <span style="color: rgb(160, 52, 240); -webkit-text-stroke-color: rgb(160, 52, 240);" class="">end</span></div><div style="margin: 0px; font-family: Times; color: rgb(176, 24, 18); -webkit-text-stroke-color: rgb(176, 24, 18); -webkit-text-stroke-width: initial;" class="">endfunction</div><div style="margin: 0px; font-family: Times; color: rgb(176, 24, 18); -webkit-text-stroke-color: rgb(176, 24, 18); -webkit-text-stroke-width: initial;" class=""><br class=""></div><div style="margin: 0px; font-family: Times; color: rgb(176, 24, 18); -webkit-text-stroke-color: rgb(176, 24, 18); -webkit-text-stroke-width: initial;" class="">and apply it to a grand of ramdom x in [0,1] like that :</div><div style="margin: 0px; font-family: Times; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 23px;" class=""><br class=""></div><div style="margin: 0px; font-family: Times; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""><span style="color: rgb(176, 24, 18); -webkit-text-stroke-color: rgb(176, 24, 18);" class="">function</span> <span style="color: rgb(131, 67, 15); -webkit-text-stroke-color: rgb(131, 67, 15);" class=""><b class="">bn</b></span><span style="color: rgb(92, 92, 92); -webkit-text-stroke-color: rgb(92, 92, 92);" class="">=</span><span style="text-decoration: underline ; font-kerning: none" class="">binomiale</span><span style="color: rgb(74, 85, 219); -webkit-text-stroke-color: rgb(74, 85, 219);" class="">(</span><span style="color: rgb(131, 67, 15); -webkit-text-stroke-color: rgb(131, 67, 15);" class=""><b class="">n</b></span>, <span style="color: rgb(131, 67, 15); -webkit-text-stroke-color: rgb(131, 67, 15);" class=""><b class="">p</b></span><span style="color: rgb(74, 85, 219); -webkit-text-stroke-color: rgb(74, 85, 219);" class="">)</span></div><div style="margin: 0px; font-family: Times; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""> a<span style="color: rgb(92, 92, 92); -webkit-text-stroke-color: rgb(92, 92, 92);" class="">=</span><span style="color: rgb(51, 185, 185); -webkit-text-stroke-color: rgb(51, 185, 185);" class="">grand</span><span style="color: rgb(74, 85, 219); -webkit-text-stroke-color: rgb(74, 85, 219);" class="">(</span><span style="color: rgb(188, 143, 143); -webkit-text-stroke-color: rgb(188, 143, 143);" class="">1</span>,<span style="color: rgb(131, 67, 15); -webkit-text-stroke-color: rgb(131, 67, 15);" class=""><b class="">n</b></span>,<span style="color: rgb(188, 143, 143); -webkit-text-stroke-color: rgb(188, 143, 143);" class="">"unf"</span>,<span style="color: rgb(188, 143, 143); -webkit-text-stroke-color: rgb(188, 143, 143);" class="">0</span>,<span style="color: rgb(188, 143, 143); -webkit-text-stroke-color: rgb(188, 143, 143);" class="">1</span><span style="color: rgb(74, 85, 219); -webkit-text-stroke-color: rgb(74, 85, 219);" class="">)</span></div><div style="margin: 0px; font-family: Times; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""> ap<span style="color: rgb(92, 92, 92); -webkit-text-stroke-color: rgb(92, 92, 92);" class="">=</span><span style="text-decoration: underline ; font-kerning: none" class="">f</span><span style="color: rgb(74, 85, 219); -webkit-text-stroke-color: rgb(74, 85, 219);" class="">(</span>a,<span style="color: rgb(131, 67, 15); -webkit-text-stroke-color: rgb(131, 67, 15);" class=""><b class="">p</b></span><span style="color: rgb(74, 85, 219); -webkit-text-stroke-color: rgb(74, 85, 219);" class="">)</span></div><div style="margin: 0px; font-family: Times; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""> <span style="color: rgb(51, 185, 185); -webkit-text-stroke-color: rgb(51, 185, 185);" class="">disp</span><span style="color: rgb(74, 85, 219); -webkit-text-stroke-color: rgb(74, 85, 219);" class="">(</span>ap<span style="color: rgb(74, 85, 219); -webkit-text-stroke-color: rgb(74, 85, 219);" class="">)</span></div><div style="margin: 0px; font-family: Times; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class=""> <span style="color: rgb(131, 67, 15); -webkit-text-stroke-color: rgb(131, 67, 15);" class=""><b class="">bn</b></span><span style="color: rgb(92, 92, 92); -webkit-text-stroke-color: rgb(92, 92, 92);" class="">=</span><span style="color: rgb(51, 185, 185); -webkit-text-stroke-color: rgb(51, 185, 185);" class="">sum</span><span style="color: rgb(74, 85, 219); -webkit-text-stroke-color: rgb(74, 85, 219);" class="">(</span>ap<span style="color: rgb(74, 85, 219); -webkit-text-stroke-color: rgb(74, 85, 219);" class="">)</span></div><div style="margin: 0px; font-family: Times; color: rgb(176, 24, 18); -webkit-text-stroke-color: rgb(176, 24, 18); -webkit-text-stroke-width: initial;" class="">endfunction</div><div style="margin: 0px; font-family: Times; color: rgb(176, 24, 18); -webkit-text-stroke-color: rgb(176, 24, 18); -webkit-text-stroke-width: initial;" class=""><br class=""></div><div style="margin: 0px; font-family: Times; color: rgb(176, 24, 18); -webkit-text-stroke-color: rgb(176, 24, 18); -webkit-text-stroke-width: initial;" class="">but it doesn't work</div><div style="margin: 0px; font-family: Times; color: rgb(176, 24, 18); -webkit-text-stroke-color: rgb(176, 24, 18); -webkit-text-stroke-width: initial;" class=""><br class=""></div><div style="margin: 0px; font-family: Times; color: rgb(176, 24, 18); -webkit-text-stroke-color: rgb(176, 24, 18); -webkit-text-stroke-width: initial;" class="">it seems like scilab would try to apply f to a as an object itself</div><div style="margin: 0px; font-family: Times; color: rgb(176, 24, 18); -webkit-text-stroke-color: rgb(176, 24, 18); -webkit-text-stroke-width: initial;" class=""><br class=""></div><div style="margin: 0px; font-family: Times; color: rgb(176, 24, 18); -webkit-text-stroke-color: rgb(176, 24, 18); -webkit-text-stroke-width: initial;" class="">could aynone help me understanding ?</div><div style="margin: 0px; font-family: Times; color: rgb(176, 24, 18); -webkit-text-stroke-color: rgb(176, 24, 18); -webkit-text-stroke-width: initial;" class=""><br class=""></div><div style="margin: 0px; font-family: Times; color: rgb(176, 24, 18); -webkit-text-stroke-color: rgb(176, 24, 18); -webkit-text-stroke-width: initial;" class="">thanks</div><div apple-content-edited="true" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""> ––––––––––––––––––––––––––<br class=""> Vincent Douce</div><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""> :=: Mathoscope :=:</div><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""> <a href="http://mathoscope.xyz" class="">http://mathoscope.xyz</a></div><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""> 06°13°11°07°26</div><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""> Bagnères de Bigorre 65200</div><div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""></div></div></div></div></div></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br class=""></body></html>