Some Basic Examples of Variable Manipulations in MATLAB % Personally I'm always ready to learn, although I do not always like % being taught. -- Winston Churchill % % I hate quotations. -- Ralph Waldo Emerson >> v = ones(1,3) v = 1 1 1 >> v = [ 1 1 1 ]; >> w = 2:4; >> w = [2 3 4]; >> x = x = [[1];[4];[9]] x = 1 4 9 >> x = [1 4 9]'; >> v * x ans = 14 >> v*3 ans = 3 3 3 >> v .* x ??? Error using ==> .* Matrix dimensions must agree. >> v .* x' ans = 1 4 9 >> y = exp(w) y = 7.3891 20.0855 54.5982 >> z = [v' w' x] z = 1 2 1 1 3 4 1 4 9 >> w*z ans = 9 29 50 %% type 'help ops' for more info