SlideShare a Scribd company logo
1 of 1
Download to read offline
1. Write a Matlab function with an input being a vector of data points (independent
measurements) and the outputs being the mean value alon with the upper and lower 95%
confidence limits. Please use equations in the "
Solution
of Example" slide. The first line of your code defines the function syntax and should look like:
function [my, uc, Ic] = confid(x) mv- mean value; uc -upper confidence limit; Ic lower
confidence limit Hand in a commented hardcopy of the code. The first set of comments (right
after the function declaration) should explain how the function is used and what the input and
output arguments are. Then every line should have a comment that explains its purpose. Test
your function on the following vector of measurements: x = [ 19.1, 22.2, 16.9, 19.4, 20.2, 18.0,
21.1 ] write the resulting mean value with the upper and lower confidence limits on a hardcopy
print out of the code and hand in.

More Related Content

Similar to 1. Write a Matlab function with an input being a vector of data point.pdf

202: When the user clicks a JCheckBox, a(n) occurs.
202: When the user clicks a JCheckBox, a(n) occurs.202: When the user clicks a JCheckBox, a(n) occurs.
202: When the user clicks a JCheckBox, a(n) occurs.
sukeshsuresh189
 
3: A(n) ________ enables a program to read data from the user.
3: A(n) ________ enables a program to read data from the user.3: A(n) ________ enables a program to read data from the user.
3: A(n) ________ enables a program to read data from the user.
sukeshsuresh189
 
22: The logical relationship between radio buttons is maintained by objects o...
22: The logical relationship between radio buttons is maintained by objects o...22: The logical relationship between radio buttons is maintained by objects o...
22: The logical relationship between radio buttons is maintained by objects o...
sukeshsuresh189
 
19: When the user presses Enter in a JTextField, the GUI component generates ...
19: When the user presses Enter in a JTextField, the GUI component generates ...19: When the user presses Enter in a JTextField, the GUI component generates ...
19: When the user presses Enter in a JTextField, the GUI component generates ...
sukeshsuresh189
 
12: When an object is concatenated with a String
12: When an object is concatenated with a String12: When an object is concatenated with a String
12: When an object is concatenated with a String
sukeshsuresh189
 
5: Every Java application is required to have
5: Every Java application is required to have5: Every Java application is required to have
5: Every Java application is required to have
sukeshsuresh189
 
15: Which method call converts the value in variable stringVariable to an int...
15: Which method call converts the value in variable stringVariable to an int...15: Which method call converts the value in variable stringVariable to an int...
15: Which method call converts the value in variable stringVariable to an int...
sukeshsuresh189
 
16: Which of the following is the method used to display a dialog box to gath...
16: Which of the following is the method used to display a dialog box to gath...16: Which of the following is the method used to display a dialog box to gath...
16: Which of the following is the method used to display a dialog box to gath...
sukeshsuresh189
 
13: What do the following statements do?
13: What do the following statements do?13: What do the following statements do?
13: What do the following statements do?
sukeshsuresh189
 
23: Which layout manager is the default for JPanel?
23: Which layout manager is the default for JPanel?23: Which layout manager is the default for JPanel?
23: Which layout manager is the default for JPanel?
sukeshsuresh189
 
Comp 328 final guide (devry)
Comp 328 final guide (devry)Comp 328 final guide (devry)
Comp 328 final guide (devry)
sukeshsuresh189
 
7: Assume the following class declaration.
7: Assume the following class declaration.7: Assume the following class declaration.
7: Assume the following class declaration.
sukeshsuresh189
 
8: Which statement below could be used to randomly select a state from an arr...
8: Which statement below could be used to randomly select a state from an arr...8: Which statement below could be used to randomly select a state from an arr...
8: Which statement below could be used to randomly select a state from an arr...
sukeshsuresh189
 
11: Which is a correct way to invoke the static method sqrt of the Math class?
11: Which is a correct way to invoke the static method sqrt of the Math class?11: Which is a correct way to invoke the static method sqrt of the Math class?
11: Which is a correct way to invoke the static method sqrt of the Math class?
sukeshsuresh189
 
14: Consider the class below:
14: Consider the class below:14: Consider the class below:
14: Consider the class below:
sukeshsuresh189
 
18: Which of the following does not generate an event?
18: Which of the following does not generate an event?18: Which of the following does not generate an event?
18: Which of the following does not generate an event?
sukeshsuresh189
 
17: provides the basic attributes and behaviors of a window—a title bar at th...
17: provides the basic attributes and behaviors of a window—a title bar at th...17: provides the basic attributes and behaviors of a window—a title bar at th...
17: provides the basic attributes and behaviors of a window—a title bar at th...
sukeshsuresh189
 
C programming session 08
C programming session 08C programming session 08
C programming session 08
Vivek Singh
 

Similar to 1. Write a Matlab function with an input being a vector of data point.pdf (20)

202: When the user clicks a JCheckBox, a(n) occurs.
202: When the user clicks a JCheckBox, a(n) occurs.202: When the user clicks a JCheckBox, a(n) occurs.
202: When the user clicks a JCheckBox, a(n) occurs.
 
3: A(n) ________ enables a program to read data from the user.
3: A(n) ________ enables a program to read data from the user.3: A(n) ________ enables a program to read data from the user.
3: A(n) ________ enables a program to read data from the user.
 
22: The logical relationship between radio buttons is maintained by objects o...
22: The logical relationship between radio buttons is maintained by objects o...22: The logical relationship between radio buttons is maintained by objects o...
22: The logical relationship between radio buttons is maintained by objects o...
 
19: When the user presses Enter in a JTextField, the GUI component generates ...
19: When the user presses Enter in a JTextField, the GUI component generates ...19: When the user presses Enter in a JTextField, the GUI component generates ...
19: When the user presses Enter in a JTextField, the GUI component generates ...
 
12: When an object is concatenated with a String
12: When an object is concatenated with a String12: When an object is concatenated with a String
12: When an object is concatenated with a String
 
5: Every Java application is required to have
5: Every Java application is required to have5: Every Java application is required to have
5: Every Java application is required to have
 
15: Which method call converts the value in variable stringVariable to an int...
15: Which method call converts the value in variable stringVariable to an int...15: Which method call converts the value in variable stringVariable to an int...
15: Which method call converts the value in variable stringVariable to an int...
 
16: Which of the following is the method used to display a dialog box to gath...
16: Which of the following is the method used to display a dialog box to gath...16: Which of the following is the method used to display a dialog box to gath...
16: Which of the following is the method used to display a dialog box to gath...
 
13: What do the following statements do?
13: What do the following statements do?13: What do the following statements do?
13: What do the following statements do?
 
23: Which layout manager is the default for JPanel?
23: Which layout manager is the default for JPanel?23: Which layout manager is the default for JPanel?
23: Which layout manager is the default for JPanel?
 
Comp 328 final guide (devry)
Comp 328 final guide (devry)Comp 328 final guide (devry)
Comp 328 final guide (devry)
 
7: Assume the following class declaration.
7: Assume the following class declaration.7: Assume the following class declaration.
7: Assume the following class declaration.
 
8: Which statement below could be used to randomly select a state from an arr...
8: Which statement below could be used to randomly select a state from an arr...8: Which statement below could be used to randomly select a state from an arr...
8: Which statement below could be used to randomly select a state from an arr...
 
11: Which is a correct way to invoke the static method sqrt of the Math class?
11: Which is a correct way to invoke the static method sqrt of the Math class?11: Which is a correct way to invoke the static method sqrt of the Math class?
11: Which is a correct way to invoke the static method sqrt of the Math class?
 
14: Consider the class below:
14: Consider the class below:14: Consider the class below:
14: Consider the class below:
 
18: Which of the following does not generate an event?
18: Which of the following does not generate an event?18: Which of the following does not generate an event?
18: Which of the following does not generate an event?
 
17: provides the basic attributes and behaviors of a window—a title bar at th...
17: provides the basic attributes and behaviors of a window—a title bar at th...17: provides the basic attributes and behaviors of a window—a title bar at th...
17: provides the basic attributes and behaviors of a window—a title bar at th...
 
C programming session 08
C programming session 08C programming session 08
C programming session 08
 
Linear Convolution using Matlab Code
Linear Convolution  using Matlab CodeLinear Convolution  using Matlab Code
Linear Convolution using Matlab Code
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 

More from ahmedmodassir

2. Consumer surplus for a group of consumers Aa Aa The following grap.pdf
 2. Consumer surplus for a group of consumers Aa Aa The following grap.pdf 2. Consumer surplus for a group of consumers Aa Aa The following grap.pdf
2. Consumer surplus for a group of consumers Aa Aa The following grap.pdf
ahmedmodassir
 
2. A. Define power. B. List five bases for power and explain each mea.pdf
 2. A. Define power. B. List five bases for power and explain each mea.pdf 2. A. Define power. B. List five bases for power and explain each mea.pdf
2. A. Define power. B. List five bases for power and explain each mea.pdf
ahmedmodassir
 
141. Which of the following statements is true A. U.S non- fin.pdf
 141. Which of the following statements is true A. U.S non- fin.pdf 141. Which of the following statements is true A. U.S non- fin.pdf
141. Which of the following statements is true A. U.S non- fin.pdf
ahmedmodassir
 

More from ahmedmodassir (17)

2. The Mars Climate Orbiter (formerly the Mars Surveyor 98 Orbiter) w.pdf
 2. The Mars Climate Orbiter (formerly the Mars Surveyor 98 Orbiter) w.pdf 2. The Mars Climate Orbiter (formerly the Mars Surveyor 98 Orbiter) w.pdf
2. The Mars Climate Orbiter (formerly the Mars Surveyor 98 Orbiter) w.pdf
 
2. The switch has been closed for a long time and is opened at t = 0..pdf
 2. The switch has been closed for a long time and is opened at t = 0..pdf 2. The switch has been closed for a long time and is opened at t = 0..pdf
2. The switch has been closed for a long time and is opened at t = 0..pdf
 
2. Transistors (25 pts) Given ID= KPnW(2L)(Vos-Vr )2. VDD 1.8V, W = .pdf
 2. Transistors (25 pts) Given ID= KPnW(2L)(Vos-Vr )2. VDD 1.8V, W = .pdf 2. Transistors (25 pts) Given ID= KPnW(2L)(Vos-Vr )2. VDD 1.8V, W = .pdf
2. Transistors (25 pts) Given ID= KPnW(2L)(Vos-Vr )2. VDD 1.8V, W = .pdf
 
2. Identifying time lags Advocates of active policy face several obst.pdf
 2. Identifying time lags Advocates of active policy face several obst.pdf 2. Identifying time lags Advocates of active policy face several obst.pdf
2. Identifying time lags Advocates of active policy face several obst.pdf
 
2. Consumer surplus for a group of consumers Aa Aa The following grap.pdf
 2. Consumer surplus for a group of consumers Aa Aa The following grap.pdf 2. Consumer surplus for a group of consumers Aa Aa The following grap.pdf
2. Consumer surplus for a group of consumers Aa Aa The following grap.pdf
 
2. Consider the system shown n Figure.4, determine a) The system fu.pdf
 2. Consider the system shown n Figure.4, determine a) The system fu.pdf 2. Consider the system shown n Figure.4, determine a) The system fu.pdf
2. Consider the system shown n Figure.4, determine a) The system fu.pdf
 
2. Classify the following variable as nominal, ordinal, discrete,.pdf
 2. Classify the following variable as nominal, ordinal, discrete,.pdf 2. Classify the following variable as nominal, ordinal, discrete,.pdf
2. Classify the following variable as nominal, ordinal, discrete,.pdf
 
2. A. Define power. B. List five bases for power and explain each mea.pdf
 2. A. Define power. B. List five bases for power and explain each mea.pdf 2. A. Define power. B. List five bases for power and explain each mea.pdf
2. A. Define power. B. List five bases for power and explain each mea.pdf
 
2. A pond is stocked with 100 fish in 1997, and it is observed that t.pdf
 2. A pond is stocked with 100 fish in 1997, and it is observed that t.pdf 2. A pond is stocked with 100 fish in 1997, and it is observed that t.pdf
2. A pond is stocked with 100 fish in 1997, and it is observed that t.pdf
 
2) (S-poin errors are systematic or random in nature. ts) List 5 .pdf
 2) (S-poin errors are systematic or random in nature. ts) List 5 .pdf 2) (S-poin errors are systematic or random in nature. ts) List 5 .pdf
2) (S-poin errors are systematic or random in nature. ts) List 5 .pdf
 
13. Is the following proposition true or false Justify your conclusi.pdf
 13. Is the following proposition true or false Justify your conclusi.pdf 13. Is the following proposition true or false Justify your conclusi.pdf
13. Is the following proposition true or false Justify your conclusi.pdf
 
141. Which of the following statements is true A. U.S non- fin.pdf
 141. Which of the following statements is true A. U.S non- fin.pdf 141. Which of the following statements is true A. U.S non- fin.pdf
141. Which of the following statements is true A. U.S non- fin.pdf
 
12. Find the transition matrix from the basis B to the basis c where .pdf
 12. Find the transition matrix from the basis B to the basis c where .pdf 12. Find the transition matrix from the basis B to the basis c where .pdf
12. Find the transition matrix from the basis B to the basis c where .pdf
 
12. Let U be a nonempty set and let P(U) be the power set of U. That .pdf
 12. Let U be a nonempty set and let P(U) be the power set of U. That .pdf 12. Let U be a nonempty set and let P(U) be the power set of U. That .pdf
12. Let U be a nonempty set and let P(U) be the power set of U. That .pdf
 
1.) Prepare contribution margin income statement at sales level o.pdf
 1.) Prepare contribution margin income statement at sales level o.pdf 1.) Prepare contribution margin income statement at sales level o.pdf
1.) Prepare contribution margin income statement at sales level o.pdf
 
1. What is the difference between law and morality 2. What are .pdf
 1. What is the difference between law and morality  2. What are .pdf 1. What is the difference between law and morality  2. What are .pdf
1. What is the difference between law and morality 2. What are .pdf
 
1. What is the purpose of criminal law 2. What are the various c.pdf
 1. What is the purpose of criminal law 2. What are the various c.pdf 1. What is the purpose of criminal law 2. What are the various c.pdf
1. What is the purpose of criminal law 2. What are the various c.pdf
 

Recently uploaded

IATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdffIATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdff
17thcssbs2
 
Liberal & Redical Feminism presentation.pptx
Liberal & Redical Feminism presentation.pptxLiberal & Redical Feminism presentation.pptx
Liberal & Redical Feminism presentation.pptx
Rizwan Abbas
 
ppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyes
ashishpaul799
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
中 央社
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

IATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdffIATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdff
 
philosophy and it's principles based on the life
philosophy and it's principles based on the lifephilosophy and it's principles based on the life
philosophy and it's principles based on the life
 
Liberal & Redical Feminism presentation.pptx
Liberal & Redical Feminism presentation.pptxLiberal & Redical Feminism presentation.pptx
Liberal & Redical Feminism presentation.pptx
 
Morse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptxMorse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptx
 
ppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyes
 
Post Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdf
Post Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdfPost Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdf
Post Exam Fun(da) Intra UEM General Quiz 2024 - Prelims q&a.pdf
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/
 
B.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdfB.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdf
 
Mbaye_Astou.Education Civica_Human Rights.pptx
Mbaye_Astou.Education Civica_Human Rights.pptxMbaye_Astou.Education Civica_Human Rights.pptx
Mbaye_Astou.Education Civica_Human Rights.pptx
 
size separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticssize separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceutics
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation
 
How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17
 
How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17
 
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matrices
 
Open Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointOpen Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPoint
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
 

1. Write a Matlab function with an input being a vector of data point.pdf

  • 1. 1. Write a Matlab function with an input being a vector of data points (independent measurements) and the outputs being the mean value alon with the upper and lower 95% confidence limits. Please use equations in the " Solution of Example" slide. The first line of your code defines the function syntax and should look like: function [my, uc, Ic] = confid(x) mv- mean value; uc -upper confidence limit; Ic lower confidence limit Hand in a commented hardcopy of the code. The first set of comments (right after the function declaration) should explain how the function is used and what the input and output arguments are. Then every line should have a comment that explains its purpose. Test your function on the following vector of measurements: x = [ 19.1, 22.2, 16.9, 19.4, 20.2, 18.0, 21.1 ] write the resulting mean value with the upper and lower confidence limits on a hardcopy print out of the code and hand in.