SlideShare a Scribd company logo
1 of 1
Download to read offline
Write a MATLAB function named dist3 that accepts two lists of numbers. Each list contains 3
real numbers that represents the x,y,z coordinates of a point. The function should return a single
real number that represents the 3-D distance between the two points.
Hint: norm(v) returns sqrt(sum(abs(v)^2))
Solution
code
function [y] = dist3(list1,list2)
list1=[1,0,3]
list2=[3,5,6]
y=sqrt(sum(abs(list1-list2).^2))
output

More Related Content

More from eyebolloptics

Aiom for the ADT List. C++ Explain what this pseudocode is doing.a.pdf
Aiom for the ADT List. C++ Explain what this pseudocode is doing.a.pdfAiom for the ADT List. C++ Explain what this pseudocode is doing.a.pdf
Aiom for the ADT List. C++ Explain what this pseudocode is doing.a.pdfeyebolloptics
 
an encryption scheme distributes randomly over the Ascii characters .pdf
an encryption scheme distributes randomly over the Ascii characters .pdfan encryption scheme distributes randomly over the Ascii characters .pdf
an encryption scheme distributes randomly over the Ascii characters .pdfeyebolloptics
 
A class has 40 students aged 17 to 34. What is the probabilty that a.pdf
A class has 40 students aged 17 to 34. What is the probabilty that a.pdfA class has 40 students aged 17 to 34. What is the probabilty that a.pdf
A class has 40 students aged 17 to 34. What is the probabilty that a.pdfeyebolloptics
 
A microbial geneticist isolates a new mutation in E. coli and wishes.pdf
A microbial geneticist isolates a new mutation in E. coli and wishes.pdfA microbial geneticist isolates a new mutation in E. coli and wishes.pdf
A microbial geneticist isolates a new mutation in E. coli and wishes.pdfeyebolloptics
 
30. The vouching of recorded payables to supporting documentation wil.pdf
30. The vouching of recorded payables to supporting documentation wil.pdf30. The vouching of recorded payables to supporting documentation wil.pdf
30. The vouching of recorded payables to supporting documentation wil.pdfeyebolloptics
 
3. Observe that every cation was initially part of a nitrate compound.pdf
3. Observe that every cation was initially part of a nitrate compound.pdf3. Observe that every cation was initially part of a nitrate compound.pdf
3. Observe that every cation was initially part of a nitrate compound.pdfeyebolloptics
 
1)Please explain the commands ifconfig, ping, traceroute, netstat, d.pdf
1)Please explain the commands ifconfig, ping, traceroute, netstat, d.pdf1)Please explain the commands ifconfig, ping, traceroute, netstat, d.pdf
1)Please explain the commands ifconfig, ping, traceroute, netstat, d.pdfeyebolloptics
 
At what point does commercialization start to create inequality Ple.pdf
At what point does commercialization start to create inequality Ple.pdfAt what point does commercialization start to create inequality Ple.pdf
At what point does commercialization start to create inequality Ple.pdfeyebolloptics
 
A benefit of an activity received by people not participating in the.pdf
A benefit of an activity received by people not participating in the.pdfA benefit of an activity received by people not participating in the.pdf
A benefit of an activity received by people not participating in the.pdfeyebolloptics
 
You are given a specification for some Java classes as follows.  A.pdf
You are given a specification for some Java classes as follows.  A.pdfYou are given a specification for some Java classes as follows.  A.pdf
You are given a specification for some Java classes as follows.  A.pdfeyebolloptics
 
8. Would the following cell have a spontaneous reaction Explain. .pdf
8. Would the following cell have a spontaneous reaction Explain. .pdf8. Would the following cell have a spontaneous reaction Explain. .pdf
8. Would the following cell have a spontaneous reaction Explain. .pdfeyebolloptics
 
Write a command to find out how many users in etcpasswd have the l.pdf
Write a command to find out how many users in etcpasswd have the l.pdfWrite a command to find out how many users in etcpasswd have the l.pdf
Write a command to find out how many users in etcpasswd have the l.pdfeyebolloptics
 
Write a program that mimics the operations of several vending machin.pdf
Write a program that mimics the operations of several vending machin.pdfWrite a program that mimics the operations of several vending machin.pdf
Write a program that mimics the operations of several vending machin.pdfeyebolloptics
 
Chapter 2 Supplemental Case Xerox Focuses on HR Xerox is a widely kno.pdf
Chapter 2 Supplemental Case Xerox Focuses on HR Xerox is a widely kno.pdfChapter 2 Supplemental Case Xerox Focuses on HR Xerox is a widely kno.pdf
Chapter 2 Supplemental Case Xerox Focuses on HR Xerox is a widely kno.pdfeyebolloptics
 
which of the following is true according to the proposition that.pdf
which of the following is true according to the proposition that.pdfwhich of the following is true according to the proposition that.pdf
which of the following is true according to the proposition that.pdfeyebolloptics
 
What type of neurons transmit send impulses through its Axon to.pdf
What type of neurons transmit send impulses through its Axon to.pdfWhat type of neurons transmit send impulses through its Axon to.pdf
What type of neurons transmit send impulses through its Axon to.pdfeyebolloptics
 
What is synchronous messaging and asynchronousSolutionSynchro.pdf
What is synchronous messaging and asynchronousSolutionSynchro.pdfWhat is synchronous messaging and asynchronousSolutionSynchro.pdf
What is synchronous messaging and asynchronousSolutionSynchro.pdfeyebolloptics
 
The nature of intimacy is static, and does not change over timeSel.pdf
The nature of intimacy is static, and does not change over timeSel.pdfThe nature of intimacy is static, and does not change over timeSel.pdf
The nature of intimacy is static, and does not change over timeSel.pdfeyebolloptics
 
The Hartwick Rule depends on ________________________ . the subs.pdf
The Hartwick Rule depends on ________________________ . the subs.pdfThe Hartwick Rule depends on ________________________ . the subs.pdf
The Hartwick Rule depends on ________________________ . the subs.pdfeyebolloptics
 
The physical aspects of services that we can see and with which we in.pdf
The physical aspects of services that we can see and with which we in.pdfThe physical aspects of services that we can see and with which we in.pdf
The physical aspects of services that we can see and with which we in.pdfeyebolloptics
 

More from eyebolloptics (20)

Aiom for the ADT List. C++ Explain what this pseudocode is doing.a.pdf
Aiom for the ADT List. C++ Explain what this pseudocode is doing.a.pdfAiom for the ADT List. C++ Explain what this pseudocode is doing.a.pdf
Aiom for the ADT List. C++ Explain what this pseudocode is doing.a.pdf
 
an encryption scheme distributes randomly over the Ascii characters .pdf
an encryption scheme distributes randomly over the Ascii characters .pdfan encryption scheme distributes randomly over the Ascii characters .pdf
an encryption scheme distributes randomly over the Ascii characters .pdf
 
A class has 40 students aged 17 to 34. What is the probabilty that a.pdf
A class has 40 students aged 17 to 34. What is the probabilty that a.pdfA class has 40 students aged 17 to 34. What is the probabilty that a.pdf
A class has 40 students aged 17 to 34. What is the probabilty that a.pdf
 
A microbial geneticist isolates a new mutation in E. coli and wishes.pdf
A microbial geneticist isolates a new mutation in E. coli and wishes.pdfA microbial geneticist isolates a new mutation in E. coli and wishes.pdf
A microbial geneticist isolates a new mutation in E. coli and wishes.pdf
 
30. The vouching of recorded payables to supporting documentation wil.pdf
30. The vouching of recorded payables to supporting documentation wil.pdf30. The vouching of recorded payables to supporting documentation wil.pdf
30. The vouching of recorded payables to supporting documentation wil.pdf
 
3. Observe that every cation was initially part of a nitrate compound.pdf
3. Observe that every cation was initially part of a nitrate compound.pdf3. Observe that every cation was initially part of a nitrate compound.pdf
3. Observe that every cation was initially part of a nitrate compound.pdf
 
1)Please explain the commands ifconfig, ping, traceroute, netstat, d.pdf
1)Please explain the commands ifconfig, ping, traceroute, netstat, d.pdf1)Please explain the commands ifconfig, ping, traceroute, netstat, d.pdf
1)Please explain the commands ifconfig, ping, traceroute, netstat, d.pdf
 
At what point does commercialization start to create inequality Ple.pdf
At what point does commercialization start to create inequality Ple.pdfAt what point does commercialization start to create inequality Ple.pdf
At what point does commercialization start to create inequality Ple.pdf
 
A benefit of an activity received by people not participating in the.pdf
A benefit of an activity received by people not participating in the.pdfA benefit of an activity received by people not participating in the.pdf
A benefit of an activity received by people not participating in the.pdf
 
You are given a specification for some Java classes as follows.  A.pdf
You are given a specification for some Java classes as follows.  A.pdfYou are given a specification for some Java classes as follows.  A.pdf
You are given a specification for some Java classes as follows.  A.pdf
 
8. Would the following cell have a spontaneous reaction Explain. .pdf
8. Would the following cell have a spontaneous reaction Explain. .pdf8. Would the following cell have a spontaneous reaction Explain. .pdf
8. Would the following cell have a spontaneous reaction Explain. .pdf
 
Write a command to find out how many users in etcpasswd have the l.pdf
Write a command to find out how many users in etcpasswd have the l.pdfWrite a command to find out how many users in etcpasswd have the l.pdf
Write a command to find out how many users in etcpasswd have the l.pdf
 
Write a program that mimics the operations of several vending machin.pdf
Write a program that mimics the operations of several vending machin.pdfWrite a program that mimics the operations of several vending machin.pdf
Write a program that mimics the operations of several vending machin.pdf
 
Chapter 2 Supplemental Case Xerox Focuses on HR Xerox is a widely kno.pdf
Chapter 2 Supplemental Case Xerox Focuses on HR Xerox is a widely kno.pdfChapter 2 Supplemental Case Xerox Focuses on HR Xerox is a widely kno.pdf
Chapter 2 Supplemental Case Xerox Focuses on HR Xerox is a widely kno.pdf
 
which of the following is true according to the proposition that.pdf
which of the following is true according to the proposition that.pdfwhich of the following is true according to the proposition that.pdf
which of the following is true according to the proposition that.pdf
 
What type of neurons transmit send impulses through its Axon to.pdf
What type of neurons transmit send impulses through its Axon to.pdfWhat type of neurons transmit send impulses through its Axon to.pdf
What type of neurons transmit send impulses through its Axon to.pdf
 
What is synchronous messaging and asynchronousSolutionSynchro.pdf
What is synchronous messaging and asynchronousSolutionSynchro.pdfWhat is synchronous messaging and asynchronousSolutionSynchro.pdf
What is synchronous messaging and asynchronousSolutionSynchro.pdf
 
The nature of intimacy is static, and does not change over timeSel.pdf
The nature of intimacy is static, and does not change over timeSel.pdfThe nature of intimacy is static, and does not change over timeSel.pdf
The nature of intimacy is static, and does not change over timeSel.pdf
 
The Hartwick Rule depends on ________________________ . the subs.pdf
The Hartwick Rule depends on ________________________ . the subs.pdfThe Hartwick Rule depends on ________________________ . the subs.pdf
The Hartwick Rule depends on ________________________ . the subs.pdf
 
The physical aspects of services that we can see and with which we in.pdf
The physical aspects of services that we can see and with which we in.pdfThe physical aspects of services that we can see and with which we in.pdf
The physical aspects of services that we can see and with which we in.pdf
 

Recently uploaded

Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnershipsexpandedwebsite
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxLimon Prince
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMELOISARIVERA8
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesAmanpreetKaur157993
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...Gary Wood
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024Borja Sotomayor
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code ExamplesPeter Brusilovsky
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....Ritu480198
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxneillewis46
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...Nguyen Thanh Tu Collection
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaEADTU
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportDenish Jangid
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...EADTU
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...Nguyen Thanh Tu Collection
 

Recently uploaded (20)

Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 

Write a MATLAB function named dist3 that accepts two lists of number.pdf

  • 1. Write a MATLAB function named dist3 that accepts two lists of numbers. Each list contains 3 real numbers that represents the x,y,z coordinates of a point. The function should return a single real number that represents the 3-D distance between the two points. Hint: norm(v) returns sqrt(sum(abs(v)^2)) Solution code function [y] = dist3(list1,list2) list1=[1,0,3] list2=[3,5,6] y=sqrt(sum(abs(list1-list2).^2)) output