Syntax
Syntax The MATLAB application is built around the MATLAB scripting language. Common usage of the MATLAB application involves using the Command Window as an interactive mathematical shell or executing text files containing MATLAB code. Variables >> x = 17 x = 17 >> x = 'hat ' x = hat >> y = x + 0 y = 104 97 116 >> x = [ 3 * 4 , pi / 2 ] x = 12.0000 1.5708 >> y = 3 * sin ( x ) y = - 1.6097 3.0000 Vec tors and matrices >> array = 1 : 3 : 9 array = 1 4 7 >> ari = 1 : 5 ari = 1 2 3 4 5 >> A ( 2 , 3 ) ans = 11 >> A ( 2 : 4 , 3 : 4 ) ans = 11 8 7 12 14 1 >> zeros ( 2 , 3 ) ans = 0 0 0 0 0 0 >> ones ( 2 , 3 ) ans = 1 1 1 1 1 1 [ J , I ] = meshgrid ( 1 : n ); A = mod ( I + J - ( n + 3 ) / 2 , n ); B = mod ( I + 2 * J - 2 , n ); M = n * A + B + 1 ; Variables are defined using t...