Solved

# matlab- syntax question

Posted on 2006-04-26
Medium Priority
126 Views
Hi,
I saw a following matlab code. there is a "." (dot) after "w1". what is the meaning of that dot? I try to remove it, and I don't see any different in the result.

w1=0.5*pi;
td=0:ts:4;
x_sin=sin(w1.*td);
plot (x_sin)
0
Question by:hsuyf

LVL 11

Accepted Solution

dbkruger earned 1000 total points
ID: 16549545
In matlab,* is matrix multiplication.

so:

a=[1 2 3]; % row vector
b = [1;2;3]; % column vector

b*a =
1  *  *
*  4  *
*  *  9

I'm not going to write it out, but you get the picture.

If you just want to multiply the first element of a times b, the second, etc. then use .*

b.*a = [1 4 9]
0

Author Comment

ID: 16549607
thank you very much!!!
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Complex Numbers are funny things.  Many people have a basic understanding of them, some a more advanced.  The confusion usually arises when that pesky i (or j for Electrical Engineers) appears and understanding the meaning of a square root of a nega…
This article seeks to propel the full implementation of geothermal power plants in Mexico as a renewable energy source.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
###### Suggested Courses
Course of the Month17 days, 8 hours left to enroll