Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
what does the . mean in 0.64.

Subject: what does the . mean in 0.64.

From: Jaap

Date: 14 Oct, 2002 14:57:44

Message: 1 of 3

I have an m- file with calculatiobns in it after most values there is a dot.
like a=rv./3.
Is there any use for this dot?

thx

jaap

Subject: what does the . mean in 0.64.

From: Ian Cowley

Date: 14 Oct, 2002 14:12:44

Message: 2 of 3

"Jaap" <jaapbarends[nospam]@(hot)(spam)mail.com> wrote in message
news:aoef19$6vt$1@news.tue.nl...
> I have an m- file with calculatiobns in it after most values there is a
dot.
> like a=rv./3.
> Is there any use for this dot?
>

The . signifies an element-by-element multiplication or division, as opposed
to a matrix multipliction or division.

For example, if you have a 1xn array and an nx1 array, then multiplying them
with a * will give you a 1x1 result, sinec * is matrix multiplication. A .*
operator will give a 1xn result:

1 * (1 2 3 4) = 1*1 + 2*2 + 3*3 +4*4 = (30)
2
3
4

1 .* (1 2 3 4) = (1*1 2*2 3*3 4*4) = (1 4 9 16)
2
3
4

Division is the same: a / operator does amtrix division (matrix A multiplied
by the inverse of B), whereas ./ divides each cell in matrix A by its
corresponding cell in matrix B.

--
Ian Cowley
ian at iancowley dot co dot uk
Cambridge, UK

Subject: what does the . mean in 0.64.

From: Jaap

Date: 14 Oct, 2002 15:35:10

Message: 3 of 3


"Ian Cowley" <null@null.null> wrote in message
news:aoefru$hqo$1@pegasus.csx.cam.ac.uk...
> "Jaap" <jaapbarends[nospam]@(hot)(spam)mail.com> wrote in message
> news:aoef19$6vt$1@news.tue.nl...
> > I have an m- file with calculatiobns in it after most values there is a
> dot.
> > like a=rv./3.
> > Is there any use for this dot?
> >
>
> The . signifies an element-by-element multiplication or division, as
opposed
> to a matrix multipliction or division.
>
> For example, if you have a 1xn array and an nx1 array, then multiplying
them
> with a * will give you a 1x1 result, sinec * is matrix multiplication. A
.*
> operator will give a 1xn result:
>
> 1 * (1 2 3 4) = 1*1 + 2*2 + 3*3 +4*4 = (30)
> 2
> 3
> 4
>
> 1 .* (1 2 3 4) = (1*1 2*2 3*3 4*4) = (1 4 9 16)
> 2
> 3
> 4
>
> Division is the same: a / operator does amtrix division (matrix A
multiplied
> by the inverse of B), whereas ./ divides each cell in matrix A by its
> corresponding cell in matrix B.
>
> --
> Ian Cowley
> ian at iancowley dot co dot uk
> Cambridge, UK
thx,
greetings jaap

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us