From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: rand() using mexCallMATLAB
Date: Fri, 13 Sep 2013 06:30:07 +0000 (UTC)
Organization: UniVistaar Solutions LLC
Lines: 11
Message-ID: <l0ubdf$6o4$>
References: <l0s63d$f2e$> <l0s6ei$krk$> <l0sbhm$m70$> <l0sjvm$50f$> <l0slcm$ki8$> <l0u6g1$d3n$> <l0u80m$8qo$> <l0u9sm$ap5$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1379053807 6916 (13 Sep 2013 06:30:07 GMT)
NNTP-Posting-Date: Fri, 13 Sep 2013 06:30:07 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 4323779
Xref: comp.soft-sys.matlab:802343

> > > mexCallMATLAB(1,lhs[0],2,rhs,"rand"); 

Could this have been the point of error.. "lhs[0]"  ?
Because in my other loop for randoms2 I had put mexCallMATLAB(1,lhs2[0],2,rhs2,"rand");
I got randoms2 as Zero. Then I changed it to 
mexCallMATLAB(1,lhs2,2,rhs2,"rand"); and compiled again, got it fine!!!
I'm not sure but that's how it worked for me.

Thank You