Professional Documents
Culture Documents
Mtlab CMD
Mtlab CMD
Mtlab CMD
w. Who which variables we have used whos how variable are used? Clear all it will clear all variables clc clear screen close all close all screens GUI clear all clear all varialbles & screens help elfun gives details to functions like round,near , etc help lang help for do-while , for loop
------------------------------------------------------------File new name file close all clear all clc # write new file
Tfinal = 6 ; N = Tfinal/h ;
to add matrix : X = [1 2 3] Y = [1 2 3; 4 5 6; 7 8 9] X = X' # gives transpose of matrix X.*y = #matrix multiplication to array multiplication (need same dimension) to make any element change Y(2,3) = 0 # element in 2nd row & 3rd colomn will change to 0 to change full row Y(3,:) = 0 # changes all elements of 3rd row to 0
to make 1st coloumn to 0 Y(1:end,1) = 0 # y starting from 1st element to end from 1st coloumn
to move selected matrix M = Y(1:2,2:3) # 1st row to 2nd row & 2nd coloumn to 3rd column
a=[1 2 3]; # create to matrix a but not use in out , it stores it for use
plot a graph
--- ---