SlideShare a Scribd company logo
1 of 54
Download to read offline
โปรแกรม MATLAB
ประกาศตัวแปร x,y
กด Enter เพื่อแสดงกราฟ
Label คือคําสั่งแสดงป้ ายชื่อ
xlabel แสดงชื่อแกน x ylabel แสดงชื่อแกน y
ใส่ชื่อกราฟโดยใช้คําสั่ง Title (ไม่ต้องปิดกราฟ จะได้ผลดังนี้)
เปลี่ยนสีของ plot
มีดังนี้ ได้แก่ เหลือง(y) แดง(r) เขียว(g) ฟ้า(b) ดํา(k)
RGB triplet คือ แม่สีหลัก
[0 0 0] RGB เป็น 0 หมดคือสีดํา
[1 1 1] RGB เป็น 1 หมดคือสีขาว
ถ้าอยากให้เป็นสีชมพูให้นําสีแดงมาผสมกับสีขาว จะได้ [0.2 1 1]
สามารถใช้คําสั่งเปลี่ยนสีเส้นกราฟได้โดยคําสั่ง plot(x,y,'red')
ทํากราฟเส้นปะเป็นจุดไข่ปลา
กดลูกศรขึ้นข้างบนและไปที่plot ('-)แล้วเปลี่ยนเป็นเส้นปะแบบจุด(-.)
ถ้าเป็นขีดและบวก (-+)
ทําเป็นขีดและวงกลม(-o)
ทําเป็นขีดและสามเหลี่ยม(-^)
คําสั่ง clc เคลียหน้าจอ
กราฟ 3 เส้น ประกาศตัวแปรดังนี้
Plot กราฟ ใส่สีใส่สัญลักษณ์ของแต่ละตัว
ใส่ชื่อของกราฟทั้ง 3 เส้น
ทําการย้ายสัญลักษณ์เพื่อไม่ให้บังเส้นกราฟ
การแยกกราฟ
Subplot (แยกกราฟ) ตามด้วย (m ,n ,p) (m คือ row , n คือ colum , p คือ จํานวนกราฟ) แล้วก็ plot
กราฟที่1
กราฟที่2
กราฟที่3
แต่พื้นที่ยังว่าง
ทํากราฟที่4
จะได้กราฟทั้งหมด4 กราฟ ดังนี้
เรื่องกราฟ 3 มิติ
กด set Path เพื่อจั้งค่าติดตั้งโปรแกรม Tooportobox จากนั้นกด Add folder
แล้วให้กด select folder ทําการกด save แล้วกด close
ให้คลิก Browse for folder เพื่อเลือกไฟล์งานที่เราจะเรียกมา
จะมีไฟล์ปรากฏดังนี้ แล้วกดเลือก โฟลเดอร์ DEM ลงไป
ใช่เปิดไฟล์ภาพ จะบอกลักษณะของภาพว่ามีขนาดอย่างไร
พิม imagese(DEM) จะเปิดภาพออกมาได้ดังนี้
สีนํา◌้ตาลคือพื้นที่สูงมาก สีนํา◌้เงินคือพื้นที่ตํา◌่มาก
ต้องการจะเห็นลักษณะภูเขาชัดเจน โดยพิมพ์คําสั่ง
imageschs(DEM,min(gradiant8(DEM),1))*hs ย่อมากจาก hill shade และมีการไล่เชดสี8เชดสี
ทําการ copy โค้ด และใส่ค่าของภูเขาลงไป
จะได้ภาพดังนี้
วิธีการหาร่องนํา◌้ copy ไปไว้ใน MATLAB *พื้นที่ร่องนํา◌้จะมีสีดําดังภาพข้างล่าง
copy โค้ดมาวางเพื่อแบ่งลุ่มนํา◌้ จะได้ดังภาพข้างล่าง
เรื่อง Image Processive
Image processing ดับเบิ้ลคลิกเพื่อเปิดภาพ
คําสั่งนี้เอาไว้สั่งไฟล์ภาพ
จะแสดงตัวเลขเยอะมาก เพื่อแสดงว่าภาพนี้คือไฟล์ดิจิตอล
เปิดไฟล์ภาพ
การแปลภาพเป็นสีเทา
กด Enter ลงมาอีกบรรทัดหนึ่งและพิมพ์figure,imshow(gray) และรุปภาพก็จะเป็นสีเทา
ภาพที่ได้จากคําสั่ง
แสดงกราฟค่าการสะท้อน เรียกว่า Histrogram
โดยพิมพ์ว่า figure,imhist(gray)
ดูไฟล์ภาพ
ทําการแปลภาพเป็นขาวดํา ให้พิมพ์คําสั่ง figure,imshow(BW)
ภาพที่ได้จากคําสั่ง
เปิดไฟล์ภาพลิงบาบูนโดยใช้คําสั่ง อ่านไฟล์
ให้พิมพ์ว่า monkey imread แล้วกด Enter แล้วพิมพ์คําสั่ง figure,imshow(monkey)
จะได้ดังภาพนี้
แสดงกราฟสีของภาพลิง โดยพิมพ์คําสั่ง figure,imhist(BW)
จะได้ดังภาพนี้
คําสั่งแก้ไขภาพให้มีความชัดเจน
แสดงภาพที่แก้ไขให้มีความชัดเจน ดังภาพข้างล่าง
กราฟของภาพที่แก้ไขให้ชัดเจน
การแสดงสีให้พิมพ์ว่า Image(C)
ภาพที่ได้จากการแสดงสี
เรื่อง WEBCAM
เช็คไดร์เวอร์กล้องโดยคําสั่งนี้
กล้องก็จะขึ้นมา
แล้ว copy ตัวสีเทา แล้วกด New scrip แล้ววางในหน้าต่างที่ขึ้นมา
แล้ว copy เพิ่มอีก
คําสั่งในการถ่ายภาพ
เรื่องภาพ Stereo
จะได้ไฟล์ในโฟล์เดอร์มา
กด New Scrip แล้ววางโค้ดที่ copy มา
เปลี่ยนคําว่า Linon 1 กับ Linon 2 เป็น Pic1 กับ Pic2 จากนั้นกด Save
จากนั้นกด RUN จะได้รูป 3D ออกมาดังภาพ
เรื่อง Guide
พิมพ์ตามรูปแล้วกด Enter
จะขึ้นหน้าต่างนี้มา
GUI = Graphic User Interface
ให้เลือก Blank GUI
จะมีหน้าต่างฟังก์ชันปรากฏขึ้นมา
ขยายหน้าจอให้เต็มเฟรม แล้วกด Push Buttom
สร้างปุ่มไว้5 ปุ่ม แล้วกด Axes
ทําการเปลี่ยนชื่อปุ่ม กดดับเบิ้ลคลิก แล้วกด BackgroundColor แล้วเปลี่ยน Frontsize หัวข้อ String
ทําการเปลี่ยนชื่อเป็น Load image
กดคลิกที่คําว่า Load
จากนั้นจะขึ้นหน้าต่างดังนี้ แล้ว copy โค้ดมาใส่ บรรทัดที่ 81
copy โค้ดมาใส่บรรทัดที่ 57
ทําจนครบ 5 ปุ่ม แล้วกด RUN
ทําการเลือกรูปภาพจากคอมพิวเตอร์
และทําการกดปุ่มทุกปุ่มจะได้ตามภาพ
ภาพที่1
ภาพที่2
ภาพที่3
เรื่อง LS5
กด New Scrip แล้วกด copy โค้ด แล้วทําการ Save
แล้วกดปุ่ม RUN
จะได้ภาพดังนี้ สีแดงแสดงถึงป่า
พื้นที่ป่าเป็นสีนํา◌้เงิน
Compro 58670411 3304_aod
Compro 58670411 3304_aod

More Related Content

Viewers also liked

Service Coordination Overview Brochure
Service Coordination Overview BrochureService Coordination Overview Brochure
Service Coordination Overview BrochureBarry Newlin
 
10 pasos hacia la madurez y realización personal
10 pasos hacia la madurez y realización personal10 pasos hacia la madurez y realización personal
10 pasos hacia la madurez y realización personalVicky Salinas Méndez
 
Looking to hire awesome people
Looking to hire awesome peopleLooking to hire awesome people
Looking to hire awesome peopleBarry Newlin
 
Ashot education and consultancy services (Pvt) Ltd
Ashot education and consultancy services (Pvt) LtdAshot education and consultancy services (Pvt) Ltd
Ashot education and consultancy services (Pvt) LtdASHOT Group
 
ศราวุธ 58670394
ศราวุธ 58670394ศราวุธ 58670394
ศราวุธ 58670394nontawatzj
 
A Framework for Improving e-Services Utilization in Rural Areas
A Framework for Improving e-Services Utilization in Rural AreasA Framework for Improving e-Services Utilization in Rural Areas
A Framework for Improving e-Services Utilization in Rural AreasSocial_worker_india
 
C lculo de ca¡da de tensi¢n en conductores de bt
C lculo de ca¡da de tensi¢n en conductores de btC lculo de ca¡da de tensi¢n en conductores de bt
C lculo de ca¡da de tensi¢n en conductores de btluis vasquez hernandez
 
Informática práctica presentación
Informática práctica presentación Informática práctica presentación
Informática práctica presentación Daniela Maldonado
 
Getting to Know Jesus The prerogative of the savior
 Getting to Know Jesus The prerogative of the savior Getting to Know Jesus The prerogative of the savior
Getting to Know Jesus The prerogative of the saviorUnfailinglove
 
CertainSafe MicroTokenization Technology Detailed Overview
CertainSafe MicroTokenization Technology Detailed OverviewCertainSafe MicroTokenization Technology Detailed Overview
CertainSafe MicroTokenization Technology Detailed OverviewSteven Russo
 
First encounter john 1.43 51
First  encounter john 1.43 51First  encounter john 1.43 51
First encounter john 1.43 51Unfailinglove
 
Seguridad en los centros de cómputo
Seguridad en los centros de cómputoSeguridad en los centros de cómputo
Seguridad en los centros de cómputoVicky Salinas Méndez
 
Interpretasi
InterpretasiInterpretasi
InterpretasiMir ra
 
Gratefulness is the key
Gratefulness is the keyGratefulness is the key
Gratefulness is the keyUnfailinglove
 
Powerpoint ftw
Powerpoint ftwPowerpoint ftw
Powerpoint ftwMel A
 

Viewers also liked (20)

Service Coordination Overview Brochure
Service Coordination Overview BrochureService Coordination Overview Brochure
Service Coordination Overview Brochure
 
10 pasos hacia la madurez y realización personal
10 pasos hacia la madurez y realización personal10 pasos hacia la madurez y realización personal
10 pasos hacia la madurez y realización personal
 
DOL Platform
DOL PlatformDOL Platform
DOL Platform
 
Looking to hire awesome people
Looking to hire awesome peopleLooking to hire awesome people
Looking to hire awesome people
 
Ashot education and consultancy services (Pvt) Ltd
Ashot education and consultancy services (Pvt) LtdAshot education and consultancy services (Pvt) Ltd
Ashot education and consultancy services (Pvt) Ltd
 
Gerencia de proyectos
Gerencia de proyectosGerencia de proyectos
Gerencia de proyectos
 
ศราวุธ 58670394
ศราวุธ 58670394ศราวุธ 58670394
ศราวุธ 58670394
 
A Framework for Improving e-Services Utilization in Rural Areas
A Framework for Improving e-Services Utilization in Rural AreasA Framework for Improving e-Services Utilization in Rural Areas
A Framework for Improving e-Services Utilization in Rural Areas
 
C lculo de ca¡da de tensi¢n en conductores de bt
C lculo de ca¡da de tensi¢n en conductores de btC lculo de ca¡da de tensi¢n en conductores de bt
C lculo de ca¡da de tensi¢n en conductores de bt
 
Informática práctica presentación
Informática práctica presentación Informática práctica presentación
Informática práctica presentación
 
Verbal phrase karina
Verbal phrase karinaVerbal phrase karina
Verbal phrase karina
 
Getting to Know Jesus The prerogative of the savior
 Getting to Know Jesus The prerogative of the savior Getting to Know Jesus The prerogative of the savior
Getting to Know Jesus The prerogative of the savior
 
CertainSafe MicroTokenization Technology Detailed Overview
CertainSafe MicroTokenization Technology Detailed OverviewCertainSafe MicroTokenization Technology Detailed Overview
CertainSafe MicroTokenization Technology Detailed Overview
 
First encounter john 1.43 51
First  encounter john 1.43 51First  encounter john 1.43 51
First encounter john 1.43 51
 
Seguridad en los centros de cómputo
Seguridad en los centros de cómputoSeguridad en los centros de cómputo
Seguridad en los centros de cómputo
 
Interpretasi
InterpretasiInterpretasi
Interpretasi
 
Gratefulness is the key
Gratefulness is the keyGratefulness is the key
Gratefulness is the key
 
About My Self.
About My Self.About My Self.
About My Self.
 
Powerpoint ftw
Powerpoint ftwPowerpoint ftw
Powerpoint ftw
 
Curriculum Vitae
Curriculum VitaeCurriculum Vitae
Curriculum Vitae
 

Compro 58670411 3304_aod