Register to reply 
Matlab Misunderstanding 
Share this thread: 
#1
Aug2613, 09:49 AM

P: 36

I'm current learning MatLab before i start my second year of engineering and i don't really understand a fundamental aspect of it. My problem is the use of the period "." and when it is deemed to be necessary.
I've looked up what this operator does and found definitions such as Element by element, Pointwise, ect. My problem is these don't mean much to me, I've done work on vectors and matrices, however matrices work consisted of mostly doing practice problems so maybe i don't full understand the fundamentals of matrices. Is there anyway somebody could explain to me what the period operator actually does. For example why are these two different y = sqrt(t).*sin(2t); y = sqrt(t)*sin(2t); And y=(3.^x)./(1+3.^x) y=(3^x )/ (1+3^x) Any clarification would be much appreciated, thank you. P.S I hope this is in the right board 


#2
Aug2613, 10:54 AM

P: 51

Dot multiplication .* is used to perform elementbyelement array multiplication. An array is either a single row (row vector) or single column (column vector) of some values. For arrayarray multiplication to work, the arrays must be the same length.
Suppose, you have an array A=[3; 2; 5] which is a 3x1 array and want to multiply it by B=[6; 9; 2] which is another 3x1 array (same lengths), you tell MATLAB to do the following; Ans=A.*B which multiplies the 2 arrays on an elementbyelement basis. This means it multiplies 3x6, 2x9 and 5x2 giving a resultant arry of [18; 18; 10] Leaving out the dot operator is for matrix multiplication which is differenet. The 2 examples you provided dont really help to explain the purpose of the dot operator as they are just scalar x scalar examples. 


Register to reply 
Related Discussions  
Simple misunderstanding.  Introductory Physics Homework  8  
Log^2(x) and log(x)^2 are the same or not?  Precalculus Mathematics Homework  6  
Some misunderstanding i've about waves  Introductory Physics Homework  1  
Why do people misunderstand each other sometimes?  General Discussion  79  
Misunderstanding of SR  Special & General Relativity  7 