MatLab

how to set start up folder in Windows?

make a file named "startup.m" under the installation folder e.g. "C:\Program Files\MATLAB\R2013a\toolbox\local"

write in "startup.m"

"cd D:\target folder"

t = [1 2 3 4 5] %row vector

t = 1:5

t = 0:0.01:1

whos %show current defined variables

pi

plot(x,y)

x=3+4i %complex number

a=[1 2 3;4 5 6;7 8 9] %matrix

b=rand(5,6) %random matrix

size(b) %size of a matrix

a' %matrix traspose

a*b %matrix multiplication

a.*b %element-wise multiplication

inv(a) %inverse matrix

a(i,j) %matrix element aij

a(1:3,2:end) %a block of matrix

a(1:3,:) %row 1 to 3 and all columns

surf(a) %plot a matrix as a 2D function of index i and j

load output.mat % load matlab matrix format file

A = load('matrixdata.txt'); % load the matrix from text file

Colorbar font size returns to default value when saving the figure?

In the figure window, go to "File->Export Setup->Fonts", uncheck the box "Custom size", click "Apply to Figure", then save the figure