%s*eye()-A replaced byg %s*eye(ma,na)-A with [ma,na] = size(A). 19/17319/2
Adeline CARNIS [Tue, 13 Oct 2015 13:31:12 +0000 (15:31 +0200)]
Test: Demo_Gui > Introduction: Getting started with Scilab > Operations
and numerical primitives

Change-Id: I026ea37ce0b143457958dad605e170a636c86a77

scilab/modules/core/demos/intro/operations.dem.sce

index 58f947b..9864bf3 100644 (file)
@@ -6,14 +6,14 @@
 //
 mode(7)
 //To quit this demo, enter CTRL+C, then type "abort"
-
+[ma,na] = size(A);
 //                  OPERATIONS
 v=1:5;W=v'*v                 //constant matrix multiplication
 W(1,:)                       //extracting first row
 W(:,$)                       //extracting last column
 Mp'*Mp+eye()                   //polynomial matrix
 Mp1=Mp(1,1)+4.5*%i           //complex
-Fi=C*(z*eye()-A)^(-1)*B;       //transfer function evaluation
+Fi=C*(z*eye(ma,na)-A)^(-1)*B;       //transfer function evaluation
 F(:,1)*Fi                    //operations with rationals
 M=[Mp -Mp; Mp' Mp+eye()]       //concatenation of polynomial matrices
 [Fi, Fi(:,1)]                // ... or rationals