MatLab Week 1

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

MatLab Week 1

01/21/2015

Clc clears everything in Command Window


Most of the time, put semicolons at the end of commands.
Variables
X = 10
Y = [10 20 30];
>>edit test1 creates an editor called test1.m separate from Command
Window in editor
x = 10
y = [10 20 30]
w = y.^2
w = y./y
w = y/y
w = y.\y divides the first one into the second
.2 in for example w=y.^2 is POWER
f9 copies the piece of code into the command window and executes
it.
Row vector use commas in a matrix series
Column vector use semicolons in matrix
To create a 2x3 matrix:
A = [1,2,3;4,5,60]
String Varible s = abcd efg blank space to write ya name
Char(abc, defg, 123-456)
Colon separate matrix vertically, Comma separates it horizontally.

You might also like