jeudi 26 juin 2014

function 'normrnd' in excutable compiled by matlab mcc doesn't work


Vote count:

0




I have a file named myfunction.m, the content is:


function []=myfunction() Z = normrnd(0,1)


Each time I issue the comman 'myfunction' in matlab, I get a random result.


Then, I compile myfunction.m using this command: mcc -m myfunction.m


and I obtain an excutable named 'myfunction'.


And I try to excute it in matlab using this command: !myfunction


However the results I get are no longer random...instead it is a fixed number, which is 0.5377..


This is so wired. Why? My OS is linux.



asked 57 secs ago






Aucun commentaire:

Enregistrer un commentaire