help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange error when trying to load a file...


From: Julien Martin
Subject: Re: Strange error when trying to load a file...
Date: Fri, 13 Nov 2009 19:19:17 +0100

John,

function X=GenereVariable(p1, p2, Delta1, Delta2)
%X prend la valeur Delta1 avec probabilité p1
%X prend la valeur Delta2 avec probabilité p2
%X prend la valeur 0 avec probabilité 1-p1-p2
U = rand;
X=Delta1 * (U<=p1) - Delta2 * (p1<U) * (p1+p2 >=U);
end

printf("%d",GenereVariable(0.5, 0.5, 0, 1));

I then added this in order to run it from a terminal only invoking the name of the file:
./variable-uniforme.m

Julien.

2009/11/13 John W. Eaton <address@hidden>
On 13-Nov-2009, Julien Martin wrote:

| I googled for this issue and some people have had it too with QtOctave.
| QtOctave seems to be a nice program though.
| Julien.
|
| 2009/11/13 Julien Martin <address@hidden>
|
| > This seems to be a QtOctave problem only though.
| > J.
| >
| > 2009/11/13 Julien Martin <address@hidden>
| >
| >> Hello,
| >>
| >>
| >> When I run this from QtOctave:
| >> *
| >> load("-text","/home/julien/Documents/données/finance/octave/variable-uniforme.m");

Exactly what is in the file variable-uniforme.m?

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]