jump to navigation

Abrasive Jet Machining ปรากฏการณ์ฝนดาวตกขนาดยอมในกระบวนการตัดวัสดุ June 29, 2011

Posted by viboon in : Manufacturing technologies , add a comment

วิบุญ ตั้งวโรดมนุกูล (2011) Abrasive Jet Machining ปรากฏการณ์ฝนดาวตกขนาดยอมในกระบวนการตัดวัสดุ, วารสารส่งเสริมเทคโนโลยี, February-March 2011, Vol.37 No.215, 67-69.


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:

Number of Zeros Chart and How to Call Them June 26, 2011

Posted by viboon in : Uncategorized , add a comment


Tags: ,

Related posts:

Why did the chicken cross the road? June 26, 2011

Posted by viboon in : Uncategorized , add a comment

This question is such an epic.

Albert Einstein: The chicken did not cross the road. The road passed beneath the chicken.

Isaac Newton: Chickens at rest tend to stay at rest. Chickens in motion tend to cross roads.

Wolfgang Pauli: There was already a chicken on this side of the road.

Carl Sagan: There are billions and billions of such chickens, crossing roads just like this one, all across the universe. [Apologies for perpetuating the misquote.]
(more…)


Tags: , ,

Related posts:

Philip Zimbardo: Why ordinary people do evil … or do good June 22, 2011

Posted by viboon in : Uncategorized , add a comment

It may be called “Lucifer Effect”.

NOTE: This presentation contains nudity and violence which may disturb some viewers.


Tags: , ,

Related posts:

Tweeting through command line in Ubuntu June 18, 2011

Posted by viboon in : Ubuntu , add a comment

1. Install curl

sudo apt-get install curl

2. Create a script file

sudo pico /usr/bin/twitter

Enter the following commands and save

curl --basic --user "yourusername:yourpasswd" --data-ascii "status=`echo $@|tr ' ' '+'`" "http://twitter.com/statuses/update.json" -o /dev/null; echo Message Sent!

3. Change the file to be executable

sudo chmod +x /usr/bin/twitter

4. Tweet!

twitter Hello Mars!

Tags: ,

Related posts:

File rename in Ubuntu June 18, 2011

Posted by viboon in : Ubuntu , add a comment

For an example, we have

P001.jpg, P002.jpg, P003.jpg

and we want to replace “P” to “M”, such that

M001.jpg, M002.jpg, M003.jpg

rename "s/\P/M/g" *.jpg

Tags: ,

Related posts: