% ; sqrt ^2
end line for matlab dont display in command window squareroot raise to a power
variable names MUST begin with letter not include spaces not include special characters other than _ names are case sensitive variable names SHOULD NOT be same as i
Notes 3: 2D arrays, adding numbers in a 2d array, skipping numbers, defining a 1D array Notes 6: strings, displaying strings, num2str,substituting numbers in 2d a rrays, changing values of a certain type in an array to another value such as negatives to 0
Various line types, plot symbols and colors may be obtained with PLOT(X,Y,S) where S is a character string made from one element from any or all the following 3 columns: o x + * s d v ^ < > p h Common matrix set up nrows=3; ncols=3; A=zeros(nrows,ncols);
b=9; c=a>b; % c = false, numerically = 0 c=a<b; % c = true, numerically = 1 To skip even numbers total3=0; for k=1:19 if fix(k/2)*2~=k total3=total3+k; end end total3 Take two vectors A=[1,2,3,4]; B=[5,6,7,8]; E=a./b- tells it to divide element by element