jump to navigation

Real Time Microphone and Camera Data Acquisition in Matlab July 18, 2011

Posted by viboon in : Matlab , add a comment

Developed by Theodoros Giannakopoulos

Ref: http://www.mathworks.com/matlabcentral/fileexchange/18596-real-time-microphone-and-camera-data-acquisition-and-audio-video-processing


Tags: , , , ,

Related posts:

Video Sudoku Solver by Matlab July 18, 2011

Posted by viboon in : Matlab , add a comment

This program was developed by Teja Muppirala.

Solves a sudoku with a web camera and then displays it while tracking the original video feed. The Image Acquisition and Image Processing Toolboxes are required.

To get the Matlab files: http://www.mathworks.com/matlabcentral/fileexchange/30088-video-sudoku-solver


Tags: , , ,

Related posts:

Crop image by using Matlab July 18, 2011

Posted by viboon in : Matlab , add a comment

Cropping ‘ngc6543a.jpg’ image when Xmin=230, Ymin=230, width=200, height=200, so that the crop rectangular vector is [230,230,200,200], respectively.

1
2
I = imread('ngc6543a.jpg');
c = imcrop(I,[230,230,200,200]);

Original image

Cropped image


Tags: , ,

Related posts:

การคำนวณการปริมาตรใต้พื้นผิวด้วย Trapezoidal numerical integration June 28, 2011

Posted by viboon in : Mathematics, Matlab , add a comment

Trapezoidal numerical integration เป็นการหา Integral ของ function ด้วยการประมาณพื้นที่ใต้กราฟ(หรือพื้นผิว)เป็นส่วนย่อยๆ ที่มีรูปร่างเป็นพื้นที่แบบสี่เหลี่ยมคางหมู (Trapezoid)

ในตัวอย่างนี้กำหนดให้หาปริมาตรใต้ surface function

Z = X^2 \sin \left[ {5\left( {X - Y} \right)} \right]

โดยการหา double integral ผ่านวิธี Trapezoidal method

1
2
3
4
5
6
7
xdata = [0; rand(100,1); 1];
ydata = [0; rand(100,1); 1];
x = sort(xdata);
y = sort(ydata);
[X,Y] = meshgrid(x,y);
Z = X.^2.*sin(5*(X-Y));
trapz(y,trapz(x,Z,2),1)

ในกรณีนี้จะได้คำตอบ

ans =
    0.0497

เมื่อใช้วิธี double integral แบบทั่วไป

1
2
F = @(x,y)(x.^2).*sin(5*(x-y));
dblquad(F,0,1,0,1)

คำตอบคือ

ans =
    0.0498

Tags: , , , , , ,

Related posts:

Combine matrices June 28, 2011

Posted by viboon in : Matlab , add a comment
horzcat(1, [2 3], [4 5 6]) %horizontally concatenates matrices
vertcat(1, [2; 3], [4; 5; 6]) %vertically concatenates matrices

This is actually equivalent to:

v1=1;
v2=[2; 3];
v3=[4; 5; 6];
v=[v1; v2; v3]

Tags: , ,

Related posts:

Anti-Alias for Matlab February 6, 2011

Posted by viboon in : Matlab , add a comment

Myaa – My Anti-Alias for Matlab
by Anders Brun
Code covered by the BSD License

Available at http://www.mathworks.com/matlabcentral/fileexchange/20979


Tags: , ,

Related posts:

Find Repeated Files by MATLAB January 11, 2011

Posted by viboon in : Matlab , add a comment

Finds Repeated Files in directory or sub-directories developed by Mike Sheppard

This code is covered by the BSD License.

Please visit:
http://www.mathworks.com/matlabcentral/fileexchange/29999


Tags: ,

Related posts:

Using toggle button in MATLAB GUI December 13, 2010

Posted by viboon in : Matlab , add a comment

This guideline will enable you to activate or deactivate your code according to the toggle button associated with while loop.

1) Open the Matlab GUI and place a toggle button on the panel.

2) Under the toggle button function, add

1
2
3
while get(hObject,'Value')
%add your statements here
end

Tags: , , ,

Related posts: