Wednesday, 24 February 2016

Matlab Introduction - My command history

I have demonstrated few tips in MATLAB. Here is my command history:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
%-- 22/2/16 4:20 PM --%
clear
clc
pwd
cd '..'
pwd
cd '~/Desktop/Digital Image Processing/Course documents/'
mkdir('matlab')
dir
cd matlab/
dir(..)
dir('..')
I = imread('../parrots.jpg');
imshow(I)
ones(3)
Ir = ones(50)*255;
Ig = ones(50)*255;
Ib = zeros(50)*255;
clearvars I
I(:,:,1) = lr;
I(:,:,1) = Ir;
I(:,:,2) = Ig;
I(:,:,3) = Ib;
Ipr = imread('../parrots.jpg');
imshow(I)
imshow(uint8(I))
Ifurkan = I/2;
Ifurkan(1:3,1:3,1)
imshow(Ifurkan)
figure,imshow(I)
imshow(uint8(Ifurkan))
doc imshow
imshow(rgb2gray(Ipr),[0.8 , 0.9])
imshow(rgb2gray(Ipr),[0.5 , 0.9])
imshow(rgb2gray(Ipr),[0.1 , 0.9])
imshow(rgb2gray(Ipr),[100 , 200])
doc image processing
imshow(Ipr)
Igr = rgb2gray(Ipr);
imshow(Igr)
imhist(Igr)
Ihe = histeq(Igr);
imshow(Ihe)
imhist(Ihe)
f = Ihe(100,:);
plot(f)
stem(f)
F = fft(f);
stem(f);figure,stem(F)
F(1:5)
stem(abs(F))
close all
stem(abs(F))
t=linspace(0,1,100);
c = cos(2*pi*t);
stem(c)
c = cos(2*pi*t*30);
stem(c)
c2 = cos(2*pi*t*20);
c3 = cos(2*pi*t*5);
call = c+c2+c3;
stem(call)
stem(abs(fft(call)))

No comments:

Post a Comment