# [Scilab-users] Empty matrix

8 messages
Open this post in threaded view
|

## [Scilab-users] Empty matrix

 Hello, Thanks to the discussion started by Samuel and the document provided by Rafael (de Boor 1990) (see http://mailinglists.scilab.org/Scilab-users-Is-cond-0-or-1-bug-15579-td4037987.html ) I discovered this astonishing mathematical object: the empty matrix. Our only use of this in Scilab is the validity of limit cases. If we don't have to test the emptiness of a matrix, it makes the life easier. However, we also expect that the behavior of such matrices is consistent with the linear algebra. ========== Linear algebra of empty matrices ========== So a few elements: let us consider a field K (usually K is ℝ or ℂ). The zero vector space is K^0 = {0}. This is the most trivial vector space, its dimension is 0 (geometrically it is a point). Let us now consider E, a K-vector space of dimension n. There is one unique linear map from E to K^0 which can be represented by the n × 0 empty matrix. There is also a unique linear map from K^0 to E which can be represented by the 0 × n empty matrix. And there is a unique linear map from K^0 to K^0 which is represented by the 0 × 0 empty matrix. The product of the 0 × n matrix by a n × p matrix is the 0 × p empty matrix. The product of a m × n matrix by the n × 0 matrix is the m × 0 empty matrix. The product of the m × 0 matrix by the 0 × p matrix is the zeros(m, p) matrix. So the product of two empty matrices is not always an empty matrix… Additionally: the 0 × 0 empty matrix is Id0, the identity of K^0. It is thus a regular matrix. As the identity, it explains why det([]) = 1 and why some considere that cond([]) = 1 (as for any identity matrix) although it breaks the formula using the norms. ========== About Scilab ========== Scilab consider only one empty matrix, the 0 × 0, denoted []. The following features are correct: sum([]) == 0 // identity element of addition prod([]) == 1 // identity element of product, also convention for the empty product inv([]) == [] []^-1 == [] // but a warning message shows up cond([]) == 1 // however this is imho more a matter of conventions and 0 is also correct []\[] == [] []/[] == [] linsolve([], []) == []// but a warning message shows up []\[0] == [] [0]/[] == [] linsolve([], [0]) == [] The following features are obviously wrong and misleading: det([]) == 0 // should be 1 linsolve([], [1 1]) == -1 // or can someone explain this result The following features are algebraically wrong but are acceptable as rules to process special cases such as a result of find(), e.g. find(a
Open this post in threaded view
|

## Re: Empty matrix

 Hi Christophe, Quite impressive summary. Fyi, the following reference on empty matrices algebra is extremelly good (and it even refers to de Boor memo and some previous ideas on the subject): Nett, C. N.  and W. M. Haddad [1993] "A system-theoretic appropriate realization of the empty matrix concept," IEEE Transactions on Automatic Control, vol. 38, no. 5, pp. 771-775 Nett and Haddad define empty matrices of size []mxn and argue that "the empty matrix concept has the  potential to provide an elegant, general means for transparently  handling special cases in matrix formulas corresponding to the absence of one or more of the matrices involved." Another interesting message from that article: " ... we have purposely avoided any and all discussion of anything but the purely algebraic properties of empty matrices. For example, we have purposely not discussed the determinant, eigenvalues, singular values, or norm of an empty matrix. The reason for this is because we feel strongly that the empty matrix concept has utility only from a purely algebraic standpoint. Note, however, that determinants, eigenvalues, singular values, and norms of  empty matrices are considered in the current version of MATLAB." Regards, Rafael _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

## [Scilab-users] orthogonal polynomials

 In reply to this post by Christophe Dang Ngoc Chan Hello, I wish to use orthogonal polynmials within Scilab. Axxording to "ttps://atoms.scilab.org/toolboxes/Ortpol",  I do       atomsInstall('Ortpol') and I get the answer atomsInstallList: The package "Ortpol" is not registered. Please check on the ATOMS repository that it is available for Scilab 6.0 on Windows. If it is, run atomsSystemUpdate() before trying atomsInstall(..) again. Where did I go wrong ? Is there a workaround ? Thank you in advance for your help. Jean-Philippe Grivet --- L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus_______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

## Re: orthogonal polynomials

 Hello, Le 06/06/2018 à 16:46, Jean-Philippe Grivet a écrit : > Hello, > > I wish to use orthogonal polynmials within Scilab. Axxording to > "ttps://atoms.scilab.org/toolboxes/Ortpol",  I do > >      atomsInstall('Ortpol') > > and I get the answer > > atomsInstallList: The package "Ortpol" is not registered. > Please check on the ATOMS repository that it is available for Scilab > 6.0 on Windows. > If it is, run atomsSystemUpdate() before trying atomsInstall(..) again. As the message suggests it, you have checked on the ATOMS repository that Ortpol was not available for Scilab 6.0 on Windows. > > Where did I go wrong ? Is there a workaround ? Thank you in advance > for your help. Ortpol is now ported to Scilab 6.0 (+ some examples fixed). You may do: atomsSystemUpdate() atomsInstall Ortpol exit // Start a new session atomsLoad Ortpol Samuel _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

## Re: orthogonal polynomials

Open this post in threaded view
|

## Re: orthogonal polynomials

 Le 09/06/2018 à 18:59, Jean-Philippe Grivet a écrit : > Thank you Samuel. However, there are some remaining bugs !When I > launch Scilab, I ger the following d=series of messages: > > Start Linalg > Start Makematrix > Start Specfun > Start Helptbx > Start Distfun > Start Stixbox > Start Apifun >     Load macros >     Load help >     Type "help apifun_overview" for quick start. > Start Ortpol >     Load macros >     Load help >     Load demos >     Type "help ortpol_overview" for quick start. >     Type "demo_gui()" and search for "Ortpol" for Demonstrations. > > So far so good. I type help ortôl_overview and I am redirected to the > last help^page I l consulted ("disp" in the present case). You must close and reopen the help browser, to make it aware of the new loaded modules and their documentation. > Back to the console, I write demo_gui() and chose ortpoly in the popup > menu. Scilab replies > > à la ligne   -11 du fichier exécuté > C:\Users\grivet\AppData\Local\SCILAB~1.1\contrib\Ortpol\0315DD~1.1\demos\Ortpol.dem.gateway.sce > à la ligne    41 de la fonction demo_gui_update ( > C:\Users\grivet\AppData\Local\scilab-6.0.1\modules\demo_tools\macros\demo_gui_update.sci > ligne 58 ) > get_absolute_file_path : Le fichier ortpol.dem.gateway.sce n'est pas > ouvert dans Scilab. I get the same error, indeed. Please report it on the Ortpol forge. > > Further question: What should I do to uninstall these modules ? Which ones? Linalg to Apifun, that you did not required? There are dependencies of Ortpol. If you uninstall them, some Ortpol code will fail. To uninstall Ortpol: --> atomsRemove Ortpol This will also uninstall its dependencies, provided that they are not used by some other modules installed intentionnaly. Samuel _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users