**Random number between -1 and 1**How do I assign a uniform random number between -1 and 1?
On Dec 4, 2:19=A0pm, "Ulrik Nash" <u...@sam.sdu.dk> wrote:
> How do I assign a uniform random number between -1 and 1?
randomNumber =3D 2 * rand(1,1) - 1
"Ulrik Nash" <uwn@sam.sdu.dk> wrote in message <hfbnb8$5sk$1@fred.mathworks.com>...
> How do I assign a uniform random number between -1 and 1?
2*rand-1
On Dec 4, 1:19=A0pm, "Ulrik Nash" <u...@sam.sdu.dk> wrote:
> How do I assign a uniform random number between -1 and 1?
If you have the Stats Toolbox, unif...

**random numbers between -1,1**Hi, how do I create an array of random numbers (not normally
distributed) between -1 and +1?
Thanks!
Andrew.
Andrew Ridge wrote:
>
>
> Hi, how do I create an array of random numbers (not normally
> distributed) between -1 and +1?
>
X = rand(nrows,ncols).*2-1;
Temu
Temu Gautama wrote:
>
>
> Andrew Ridge wrote:
>>
>>
>> Hi, how do I create an array of random numbers (not normally
>> distributed) between -1 and +1?
>>
>
> X = rand(nrows,ncols).*2-1;
>
> Temu
Great, thanks very much!
...

**Random number between -1 and 1??**I have a number X that I randomly would like to increase or decrease with a
number.
I know that I can use Math.random() but that only generates a positive
number. How do I get a random number that can be either negative or
positive?
JS
n = random() * 2 - 1;
"ms" <dsf@as.com> wrote in message
news:L3Dyd.77016$Vf.3634421@news000.worldonline.dk...
>I have a number X that I randomly would like to increase or decrease with a
> number.
>
> I know that I can use Math.random() but that only generates a positive
> number. How do I get a random number that can be ei...

**LaTex equation numbering like 2.1, 2.2, also 2.0.1, 2.0,2, 2.1.1, etc**David Roach wrote:
> Is there a simple command to have latex number
> the equations by the section numbers automatically.
>
> David
From the LaTeX Companion (what a wonderful book!)
%%%%%%%%%%%%%%%%%%%%%%
% number equations within sections
% In preamble
\makeatletter
\@addtoreset{equation}{section}
\makeatother
\renewcommand{\theequation}{\thesection.\arabic{equation}}
%%%%%%%%%%%%%%%%%%%%%%
Numbers within sections...I use this all the time in articles. Even
works with
*******************
*******************
Brilliant. And then I got numbering within subsections
by repe...

**2 counters, show numbering 1.2., print only 1. instead of 1.0.?**I've set up the counters & co, but how can it actually be done that
the trailing zeros get omitted (also with 3 counters)?
(somehow failed with ifthen package and just ran away from plain
TeX..)
K?rlis Repsons <karlis.repsons@gmail.com> wrote:
> I've set up the counters & co, but how can it actually be done that
> the trailing zeros get omitted (also with 3 counters)?
> (somehow failed with ifthen package and just ran away from plain
> TeX..)
Replace "A" and "B" with the counter names:
\renewcommand*{\theB}{%
\arabic{A}%
\ifnum\valu...

**How to generate vector of random numbers in any interval (e.g. [-1 1]) that sums to 1)**Hello,
I'd like to generate a vector of random numbers,which take values in any interval (e.g. [-1 1]),and this vector sums to 1...
Thanx in advance...
Vassilis...
Just renormalise:
y = rand(1,N);
S = sum(y);
y = y/S; % renormalisation
"Vassilios Vassiliadis" <v.vassiliadis@fme.aegean.gr> wrote in message <ibbfkv$l6m$1@fred.mathworks.com>...
> Hello,
> I'd like to generate a vector of random numbers,which take values in any interval (e.g. [-1 1]),and this vector sums to 1...
>
> Thanx in advance...
> Vassilis......

**the number 1 that is most right of binary number**Hello newsgroup,
In some of my work , I am dealing with binary numbers.
Dec Binary
----- -------------------
1 1 0 0 0
2 0 1 0 0
3 1 1 0 0
4 0 0 1 0
5 1 0 1 0
6 0 1 1 0
7 1 1 1 0
8 0 0 0 1
9 1 0 0 1
10 0 1 0 1
After converting a decimal number to its binary form using the "de2bi" function, for each digit, I need to find the posit...

**char(1) vs Number(1)**Quick check on whether char(1) is more efficient than number (1).
Basically storing a bit value of either 0 or 1. since this is a
numeric maybe its better to store this as number(1).
Did a simple test for 1million rows, the IO cost is the same but the
number of bytes is double with number(1).
This makes me think that char(1) is more efficient in storage.
any thoughts?
On Nov 30, 9:59=A0am, CrazyKarma <ska...@gmail.com> wrote:
> Quick check on whether char(1) is more efficient than number (1).
> Basically storing a bit value of either 0 or 1. since this is a
> nume...

**Random numbers in range [-1,1]**Hi all,
How do I get random numbers that are not restricted to
positive values, i.e., random values in the range [-1,1]?
Thanks
"Di " <startnewd@gmail.com> wrote in message <fd8ie7$pv5
$1@fred.mathworks.com>...
> Hi all,
>
> How do I get random numbers that are not restricted to
> positive values, i.e., random values in the range [-1,1]?
>
> Thanks
If you have a function generating positive random numbers
between 0 --> 1 try subtracting 0.5, then multiplying by 2.
Stage 1 gives you random numbers between -0.5 & +0.5,
multiplying by 2 ...

**Numbers 1.0.1 available**Performance sucks less, but still sucks.
Machine is a 2x1.8GHz G5 with 1GB of RAM and OS X 10.4.10.
I had in AppleWorks a table that was 8 columns wide and several thousand
rows. The first six columns were data. The seventh was a formula
involving columns 2,3,5,6 of its own row. The eighth was a formula
involving column 6 of its own row and the prior row.
AppleWorks was always lightning fast, even when I was running on a
G4/450 (under 10.3, with 512MB).
Numbers 1.0 was so slow that I decided I didn't _really_ need column 8.
That did help a lot. Even so, edits to the columns refere...

**Number of days in 1/1/2000**I am looking for a script that can report the number of days since
2000. It should handle leap years but I am not worried about accuracy
to the hour/minute or seconds. I am writing a calendar program and need
a reference point to base all my dates from. So I picked 1/1/2000.
There are many calendar functions built into PHP
http://us3.php.net/manual/en/ref.calendar.php
I would suggest you look into those, as you may find a much better way
to do what you want.
el_roachmeister@yahoo.com said the following on 11/11/2005 16:24:
> I am looking for a script that can report the number of days s...

**Merg Numbers - 1+1=11**Hello,
1+1 = 2
How can i merg two numbers so it would be...
1+1 = 11
?
-Thank-You-
"name" <e@m.a> wrote in message
news:goT3b.1841$Om1.1829@newsread2.news.atl.earthlink.net...
> Hello,
>
> 1+1 = 2
> How can i merg two numbers so it would be...
> 1+1 = 11
Something like:
Str11 := '1' + '1' ;
Or:
Str11 := IntToStr(1) + IntToStr(1);
?
--
Michael Brown
www.emboss.co.nz : OOS/RSI software and more :)
Add michael@ to emboss.co.nz - My inbox is always open
"name" <e@m.a> wrote in message
news...

**Another issue:How to transform a vector of randomly generated numbers in the interval [-1 1],so as to sum up to 1??**Hello,
another issue which I've not managed to tackle is the following:
Assuming that I generate a random vector of numbers restricted (only!!!) in the interval
[-1 1].Afterwards,as a second step,I'd like to properly 'transform' (is a sense) this vector in order to sum up to 1.How can I achieve this??
Thanx in advance...
Vassilios...
...

**Number of days since 1/1/2000**I am using the following subroutine to calculate the number of days
since 1/1/2000 . Is there any possible bug in it? I know I can use
Date::Manip but it will slow down my program which is around 100 kb
long.
use strict;
use warnings;
my $days = &calc_days;
print "The number of days since 1/1/2000 is $days\n";
###############
sub calc_days {
my ( $mday, $mon, $year ) = ( localtime(time) )[3,4,5];
if ($mday < 10) { $mday = "0$mday"; }
$year += 1900;
# assign the Beginning date values
my ($MTH,$TDD,$YRW) = (1,1,2000);
my @TM = (31,28,31,30,31,30,31,31...

**Uniform Random Number Matrix of 1,-1**Can anyone help me?
I would like to create a 5x5 matrix of +1 and -1 with equal
probability using the Rand function in MATLAB 6.5.
I do not have any additional toolboxes to use functions such as
Randint or Randsrc.
Thanks.
"Sean Michael" <sandman_sm37@hotmail.com> wrote in message
news:eefce5d.-1@webx.raydaftYaTP...
> Can anyone help me?
>
> I would like to create a 5x5 matrix of +1 and -1 with equal
> probability using the Rand function in MATLAB 6.5.
> I do not have any additional toolboxes to use functions such as
> Randint or Randsrc.
>
> Thanks.
...

**How to use equation number (A-1) instead of (1)?**Hi, group,
I have 20 equations and I want the first 10 to be numbered as (A-1),
(A-2) ... (A-10) and the last 10 to be numbered as (B-1), (B-2)
....(B-10). How to do that? Thanks.
Vol.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message
Vol schreef:
> Hi, group,
> I have 20 equations and I want the first 10 to be numbered as (A-1),
> (A-2) ... (A-10) and the last 10 to be numbered as (B-1), (B-2)
> ...(B-10). How to do that? Thanks.
Use the subequations environment which you find in amsmath. You will
then have to redefine the nu...

**/opt/build/ruby/lib/ruby/1.8/mkmf.rb:345:in `%': numbered(1) after unnumbered(1) (ArgumentError)**The error in the subject happens to me on HP-UX. What does it mean?
Thanks,
Ittay
--
--
Ittay Dror <ittay.dror@gmail.com>
Hi,
At Sun, 7 Dec 2008 22:46:47 +0900,
Ittay Dror wrote in [ruby-talk:322136]:
> The error in the subject happens to me on HP-UX. What does it mean?
$ ruby -e '"%s %1$s" % "a"'
-e:1:in `%': numbered(1) after unnumbered(1) (ArgumentError)
Fixed trunk and 1.8 branch in the repository.
--
Nobu Nakada
...

**Generate a Random number between -1 and 1 with mean 0**Hi,
I need help generating a random number between -1 and 1 with a specified mean and variance.
I'm using c=a + b*randn() with 'a' as the mean and b as the standard deviation but the problem is that since the randn function only generates a mean zero standard deviation 1 random variable then I might end up having c greater or less than 1.
Thanks
"Natialol" wrote in message <j55j7k$aj0$1@newscl01ah.mathworks.com>...
> Hi,
>
> I need help generating a random number between -1 and 1 with a specified mean and variance.
>
> I'm using c=a...

**random number including 1**Hi,
random.random() will generate a random value in the range [0, 1).
Is there an easy way to generate random values in the range [0, 1]?
I.e., including 1?
I am implementing an algorithm and want to stay as true to the
original design specifications as possible though I suppose the
difference between the two max values might be minimal.
Thanks,
Esmail
ps: I'm confused by the docs for uniform():
random.uniform(a, b)
Return a random floating point number N such that a <= N <= b for a <= b
this seems to imply an inclusive range, ie. [a,b]
but this seems to contradict it...

**Computist Project: Core Volume 1 Number 1**....is being posted to comp.binaries.apple2, as individual jpgs, a set
of zip files, and as one complete zip file. For those who are having
trouble with the posts in the binary group, they will most likely
appear on the Ground ftp site shortly. I'm also working to get my
website (tarnover.org) back online; that should hopefully be early
this week. The files will also be available there.
- Mike
maginnis@tarnover.org
As far as I know, this completes the Core periodicals (excluding the
updates). There were hints that a fourth edition covering databases
was to be published, but it never ...

**generate random number following GARCH(1,1)**Hi all,
I would like to generate 1000 observations (after 100 transient observations) following the GARCH (1,1) Model:
Yt = μ + εt ,
εt = ξt σ , ξt∼ N (0,1)
σt^ 2 = c + αε (t −1)^2+ βσ(t −1) 2
where u, c, α and β will be specified at some values.
I have been looking in the help menu in Matlab, but I have no clue how to do it.
Can anyone provide some hints? Thanks.
Leo
...

**Setting Port Numbers in 6.1.1. HELP!**i've discovered that ATT DSL has made the internet
a safer place by blocking the port that eudora uses
to get to my mail spooler on my non ATT domain.
oh, joy.
now, i can't find out how to change the port eudora
uses, without editing the registery... is there anyone
out there who knows how? it seems it's blocking
port 25, and my spooler will see another port, if only
i can figure out how to get eudora to do that....
thanks in advance.....
randy
akirra@fulthrotl.com
On Wed, 16 Jun 2004 03:16:49 GMT, "randy allen"
<randy.allen2@worldnet.att.net&...

**do matlab has combination fuction? for example, I want to selcet 2 numbers from 1,2,3,4,5,then I want to get following array:[1,2],[1,3],.....**undefined
In article <ef33da0.-1@webx.raydaftYaTP>, dincent <accessdxt123@163.com> wrote:
> undefined
I might have responded to this with a reasonable answer,
had you NOT posted your entire question as the subject
title and left the body of the post as "undefined".
Too bad.
John
--
The best material model of a cat is another, or preferably the same, cat.
A. Rosenblueth, Philosophy of Science, 1945
Those who can't laugh at themselves leave the job to others.
Anonymous
...

**EXISTS(INFINITY): {}eINFINITY and IF(NUMBER e INFINITY) THEN(SO IS NUMBER+1)**This is the AXIOM OF INFINITY!
EXISTS(INFINITY): {}eINFINITY and IF(NUMBER e INFINITY) THEN(SO IS NUMBER+1)
....
SCi.mAtH use this AXIOM OF INFINITY in ZFC so they can pruve...
TO INFINITY......
.....AND BEYOND!
....no... this is not a joke!
http://en.wikipedia.org/wiki/Zermelo%E2%80%93Fraenkel_set_theory
E(x): {}ex & A(y): yex -> S(y)ex
Herc
--
http://MATHEOLOGY.COM
On Dec 29, 5:58=A0am, "INFINITY POWER" <infin...@limited.com> wrote:
> This is the AXIOM OF INFINITY!
>
> EXISTS(INFINITY): {}eINFINITY and IF(NUMBER e INFINITY) THEN(SO IS N...

**Number 1 again!**Lisp is number 1 again on reddit.com :-)
At the moment, http://reddit.com/info/7mdx/comments is on place
one of the front page. 110 points, 44 comments.
...