##### Title

##### Question

Going through the matrix operators I found some basic matrix operators such as cross, eye, etc., but I did not see any dot product function. That is basic vector operation so I assume I am missing something here. What am I missing?

Scilab

__Answers:__

This should help you- https://help.scilab.org/doc/6.0.0/en_US/scilab_keywords.html

I can find nothing there that is even closely related to the matrix operation of the dot product!

I can find nothing there that is even closely related to the matrix operation of the dot product! Maybe it is under some other name for the function, something like was done for the root locus method which you people call the Evans function. As a programmer I name functions so that the user will find them very easily: everyone knows root locus, but very few people know the some scientist named Evans was the originator of the root locus method.

Unfortunately, Scilab does not seem to have a built-in dot product. It is easy to define a function, however, and use it. This function should first invoke .* (dot followed by *, without any space), and then the components of the resulting vector can be added up using the sum command. An example of .* is given in https://cloud.scilab.in/index?eid=4296, in our textbook companion page. You may have to click the box with left-right-arrow, in case the code is not visible. I located this by going to scilab.in and then clicking Search -> TBC Code Search, and then searching for the word "dot". Preliminary learning material on Scilab is available in these Spoken Tutorials: http://spoken-tutorial.org/tutorial-search/?search_foss=Scilab&search_language=English. The eighth tutorial in this series is on Scritps and Functions.

I have since found 2 ways to do this: define A & B as 2 vectors. Then sum(A.*B) and A*B' both calculate the dot product. Why this dot product

function is not part of the matrix operators is beyond my reasoning.

That is precisely what I meant, sum of a.*b. Because it is very simple, they have not defined a new function! In any case, you may find the links in my last post to be useful.

Login to add comment

Login to add comment