SlideShare a Scribd company logo
1 of 2
Download to read offline
Matlab programming: Create a matlab function titled my_sqrt(x) that calculates the square root
of x as the output WITHOUT USING MATLAB'S BUILTIN SQUARE ROOT
FUNCTION OR THE POWER OPERATOR (^)
PLEASE NOTE: you can only use matlab's arithmetic operations, logical operations, relational
operations, conditional statements, loops( for loop, while loop), I/O (display, input()), scalars,
matrices, and vectors to build this function.
PLEASE KEEP IN MIND THAT YOU ARE NOT ALLOWED TO USE THE BUILTIN
SQUARE ROOT FUNCTION OR THE POWER OPERATOR(^).
Include comments throughout the program, explaining what you did. Also include a script file
that shows one test case so that I can see what you did.
Solution
//function
function [out] = my_sqrt[in]
//check the value
if value < 1
error ('need more data')
end
//square data
out = in^0.5;
end
Matlab programming- Create a matlab function titled my_sqrt(x) that ca.docx

More Related Content

Similar to Matlab programming- Create a matlab function titled my_sqrt(x) that ca.docx

Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlabTarun Gehlot
 
Introduction to matlab lecture 1 of 4
Introduction to matlab lecture 1 of 4Introduction to matlab lecture 1 of 4
Introduction to matlab lecture 1 of 4Randa Elanwar
 
Matlab Programming Help Research Guidance
Matlab Programming Help Research GuidanceMatlab Programming Help Research Guidance
Matlab Programming Help Research GuidanceMatlab Simulation
 
interfacing matlab with embedded systems
interfacing matlab with embedded systemsinterfacing matlab with embedded systems
interfacing matlab with embedded systemsRaghav Shetty
 
Kevin merchantss
Kevin merchantssKevin merchantss
Kevin merchantssdharmesh69
 
KEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENTKEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENTtejas1235
 
Lecture 19 matlab_script&function_files06
Lecture 19 matlab_script&function_files06Lecture 19 matlab_script&function_files06
Lecture 19 matlab_script&function_files06Aman kazmi
 
MATLAB Basics-Part1
MATLAB Basics-Part1MATLAB Basics-Part1
MATLAB Basics-Part1Elaf A.Saeed
 
Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013amanabr
 
Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013Kurmendra Singh
 

Similar to Matlab programming- Create a matlab function titled my_sqrt(x) that ca.docx (20)

MatlabIntro (1).ppt
MatlabIntro (1).pptMatlabIntro (1).ppt
MatlabIntro (1).ppt
 
Introduction to Matlab.ppt
Introduction to Matlab.pptIntroduction to Matlab.ppt
Introduction to Matlab.ppt
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
EE6711 Power System Simulation Lab manual
EE6711 Power System Simulation Lab manualEE6711 Power System Simulation Lab manual
EE6711 Power System Simulation Lab manual
 
MATLAB INTRODUCTION
MATLAB INTRODUCTIONMATLAB INTRODUCTION
MATLAB INTRODUCTION
 
Matlab booklet
Matlab bookletMatlab booklet
Matlab booklet
 
MATLAB guide
MATLAB guideMATLAB guide
MATLAB guide
 
Introduction to matlab lecture 1 of 4
Introduction to matlab lecture 1 of 4Introduction to matlab lecture 1 of 4
Introduction to matlab lecture 1 of 4
 
What is matlab
What is matlabWhat is matlab
What is matlab
 
Matlab Programming Help Research Guidance
Matlab Programming Help Research GuidanceMatlab Programming Help Research Guidance
Matlab Programming Help Research Guidance
 
interfacing matlab with embedded systems
interfacing matlab with embedded systemsinterfacing matlab with embedded systems
interfacing matlab with embedded systems
 
Matlab Basic Tutorial
Matlab Basic TutorialMatlab Basic Tutorial
Matlab Basic Tutorial
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introduction
 
Kevin merchantss
Kevin merchantssKevin merchantss
Kevin merchantss
 
KEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENTKEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENT
 
Lecture 19 matlab_script&function_files06
Lecture 19 matlab_script&function_files06Lecture 19 matlab_script&function_files06
Lecture 19 matlab_script&function_files06
 
MATLAB Basics-Part1
MATLAB Basics-Part1MATLAB Basics-Part1
MATLAB Basics-Part1
 
Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013
 
Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013
 
Matlab basic and image
Matlab basic and imageMatlab basic and image
Matlab basic and image
 

More from maryi15

Meditorian Banking Statistics The monetary policy of Meditor is determ.docx
Meditorian Banking Statistics The monetary policy of Meditor is determ.docxMeditorian Banking Statistics The monetary policy of Meditor is determ.docx
Meditorian Banking Statistics The monetary policy of Meditor is determ.docxmaryi15
 
Megatronics Corporation- a massive retailer of electronic products- is.docx
Megatronics Corporation- a massive retailer of electronic products- is.docxMegatronics Corporation- a massive retailer of electronic products- is.docx
Megatronics Corporation- a massive retailer of electronic products- is.docxmaryi15
 
Medfin Accounting Company (MAC) specializes in providing accounting an (1).docx
Medfin Accounting Company (MAC) specializes in providing accounting an (1).docxMedfin Accounting Company (MAC) specializes in providing accounting an (1).docx
Medfin Accounting Company (MAC) specializes in providing accounting an (1).docxmaryi15
 
Mechanics of solids Mechanics of solidsSolutionMechanics of solids -.docx
Mechanics of solids   Mechanics of solidsSolutionMechanics of solids -.docxMechanics of solids   Mechanics of solidsSolutionMechanics of solids -.docx
Mechanics of solids Mechanics of solidsSolutionMechanics of solids -.docxmaryi15
 
Medical xrays- with a wavelength of about 10-10m (Negative 10 is a exp (1).docx
Medical xrays- with a wavelength of about 10-10m (Negative 10 is a exp (1).docxMedical xrays- with a wavelength of about 10-10m (Negative 10 is a exp (1).docx
Medical xrays- with a wavelength of about 10-10m (Negative 10 is a exp (1).docxmaryi15
 
Measurement of elevation in grassy areas in photogrammetry requires th.docx
Measurement of elevation in grassy areas in photogrammetry requires th.docxMeasurement of elevation in grassy areas in photogrammetry requires th.docx
Measurement of elevation in grassy areas in photogrammetry requires th.docxmaryi15
 
Measurements of the radioactivity of a certain isotope tell you that t.docx
Measurements of the radioactivity of a certain isotope tell you that t.docxMeasurements of the radioactivity of a certain isotope tell you that t.docx
Measurements of the radioactivity of a certain isotope tell you that t.docxmaryi15
 
Measles has become an epidemic here in Orange County- About 1 in 1000.docx
Measles has become an epidemic here in Orange County- About 1 in 1000.docxMeasles has become an epidemic here in Orange County- About 1 in 1000.docx
Measles has become an epidemic here in Orange County- About 1 in 1000.docxmaryi15
 
May someone please help me solve this problem- Thank you very much I h.docx
May someone please help me solve this problem- Thank you very much I h.docxMay someone please help me solve this problem- Thank you very much I h.docx
May someone please help me solve this problem- Thank you very much I h.docxmaryi15
 
MATLAB- In this exercise- we will work with two string related functio.docx
MATLAB- In this exercise- we will work with two string related functio.docxMATLAB- In this exercise- we will work with two string related functio.docx
MATLAB- In this exercise- we will work with two string related functio.docxmaryi15
 
MC interference and diffraction Due in 3 hours- 37 minutes Evaluate ea.docx
MC interference and diffraction Due in 3 hours- 37 minutes Evaluate ea.docxMC interference and diffraction Due in 3 hours- 37 minutes Evaluate ea.docx
MC interference and diffraction Due in 3 hours- 37 minutes Evaluate ea.docxmaryi15
 
MATLAB- Write a function whose input is a positive integer n- and whos.docx
MATLAB- Write a function whose input is a positive integer n- and whos.docxMATLAB- Write a function whose input is a positive integer n- and whos.docx
MATLAB- Write a function whose input is a positive integer n- and whos.docxmaryi15
 
MBO works by cascading objectives down through the organization- and t.docx
MBO works by cascading objectives down through the organization- and t.docxMBO works by cascading objectives down through the organization- and t.docx
MBO works by cascading objectives down through the organization- and t.docxmaryi15
 
Matthew borrows $250-000 to invest in bonds- During 2013- his interest.docx
Matthew borrows $250-000 to invest in bonds- During 2013- his interest.docxMatthew borrows $250-000 to invest in bonds- During 2013- his interest.docx
Matthew borrows $250-000 to invest in bonds- During 2013- his interest.docxmaryi15
 
Matlab functions- 1)sumOddInts will use a for loop to sum all the odd.docx
Matlab functions- 1)sumOddInts will use a for loop to sum all the odd.docxMatlab functions- 1)sumOddInts will use a for loop to sum all the odd.docx
Matlab functions- 1)sumOddInts will use a for loop to sum all the odd.docxmaryi15
 
Matlab programming- Write a function in Matlab with interface function.docx
Matlab programming- Write a function in Matlab with interface function.docxMatlab programming- Write a function in Matlab with interface function.docx
Matlab programming- Write a function in Matlab with interface function.docxmaryi15
 
matrix norm For all column vectors x of dimension 2 x 1- can we say --.docx
matrix norm For all column vectors x of dimension 2 x 1- can we say --.docxmatrix norm For all column vectors x of dimension 2 x 1- can we say --.docx
matrix norm For all column vectors x of dimension 2 x 1- can we say --.docxmaryi15
 
Materials purchased on account during the month amounted to $180-000-.docx
Materials purchased on account during the month amounted to $180-000-.docxMaterials purchased on account during the month amounted to $180-000-.docx
Materials purchased on account during the month amounted to $180-000-.docxmaryi15
 
Match the following terms with the correct description below- a- oxida.docx
Match the following terms with the correct description below- a- oxida.docxMatch the following terms with the correct description below- a- oxida.docx
Match the following terms with the correct description below- a- oxida.docxmaryi15
 
Material Science- What are the possible effects if you add a Dopant to.docx
Material Science- What are the possible effects if you add a Dopant to.docxMaterial Science- What are the possible effects if you add a Dopant to.docx
Material Science- What are the possible effects if you add a Dopant to.docxmaryi15
 

More from maryi15 (20)

Meditorian Banking Statistics The monetary policy of Meditor is determ.docx
Meditorian Banking Statistics The monetary policy of Meditor is determ.docxMeditorian Banking Statistics The monetary policy of Meditor is determ.docx
Meditorian Banking Statistics The monetary policy of Meditor is determ.docx
 
Megatronics Corporation- a massive retailer of electronic products- is.docx
Megatronics Corporation- a massive retailer of electronic products- is.docxMegatronics Corporation- a massive retailer of electronic products- is.docx
Megatronics Corporation- a massive retailer of electronic products- is.docx
 
Medfin Accounting Company (MAC) specializes in providing accounting an (1).docx
Medfin Accounting Company (MAC) specializes in providing accounting an (1).docxMedfin Accounting Company (MAC) specializes in providing accounting an (1).docx
Medfin Accounting Company (MAC) specializes in providing accounting an (1).docx
 
Mechanics of solids Mechanics of solidsSolutionMechanics of solids -.docx
Mechanics of solids   Mechanics of solidsSolutionMechanics of solids -.docxMechanics of solids   Mechanics of solidsSolutionMechanics of solids -.docx
Mechanics of solids Mechanics of solidsSolutionMechanics of solids -.docx
 
Medical xrays- with a wavelength of about 10-10m (Negative 10 is a exp (1).docx
Medical xrays- with a wavelength of about 10-10m (Negative 10 is a exp (1).docxMedical xrays- with a wavelength of about 10-10m (Negative 10 is a exp (1).docx
Medical xrays- with a wavelength of about 10-10m (Negative 10 is a exp (1).docx
 
Measurement of elevation in grassy areas in photogrammetry requires th.docx
Measurement of elevation in grassy areas in photogrammetry requires th.docxMeasurement of elevation in grassy areas in photogrammetry requires th.docx
Measurement of elevation in grassy areas in photogrammetry requires th.docx
 
Measurements of the radioactivity of a certain isotope tell you that t.docx
Measurements of the radioactivity of a certain isotope tell you that t.docxMeasurements of the radioactivity of a certain isotope tell you that t.docx
Measurements of the radioactivity of a certain isotope tell you that t.docx
 
Measles has become an epidemic here in Orange County- About 1 in 1000.docx
Measles has become an epidemic here in Orange County- About 1 in 1000.docxMeasles has become an epidemic here in Orange County- About 1 in 1000.docx
Measles has become an epidemic here in Orange County- About 1 in 1000.docx
 
May someone please help me solve this problem- Thank you very much I h.docx
May someone please help me solve this problem- Thank you very much I h.docxMay someone please help me solve this problem- Thank you very much I h.docx
May someone please help me solve this problem- Thank you very much I h.docx
 
MATLAB- In this exercise- we will work with two string related functio.docx
MATLAB- In this exercise- we will work with two string related functio.docxMATLAB- In this exercise- we will work with two string related functio.docx
MATLAB- In this exercise- we will work with two string related functio.docx
 
MC interference and diffraction Due in 3 hours- 37 minutes Evaluate ea.docx
MC interference and diffraction Due in 3 hours- 37 minutes Evaluate ea.docxMC interference and diffraction Due in 3 hours- 37 minutes Evaluate ea.docx
MC interference and diffraction Due in 3 hours- 37 minutes Evaluate ea.docx
 
MATLAB- Write a function whose input is a positive integer n- and whos.docx
MATLAB- Write a function whose input is a positive integer n- and whos.docxMATLAB- Write a function whose input is a positive integer n- and whos.docx
MATLAB- Write a function whose input is a positive integer n- and whos.docx
 
MBO works by cascading objectives down through the organization- and t.docx
MBO works by cascading objectives down through the organization- and t.docxMBO works by cascading objectives down through the organization- and t.docx
MBO works by cascading objectives down through the organization- and t.docx
 
Matthew borrows $250-000 to invest in bonds- During 2013- his interest.docx
Matthew borrows $250-000 to invest in bonds- During 2013- his interest.docxMatthew borrows $250-000 to invest in bonds- During 2013- his interest.docx
Matthew borrows $250-000 to invest in bonds- During 2013- his interest.docx
 
Matlab functions- 1)sumOddInts will use a for loop to sum all the odd.docx
Matlab functions- 1)sumOddInts will use a for loop to sum all the odd.docxMatlab functions- 1)sumOddInts will use a for loop to sum all the odd.docx
Matlab functions- 1)sumOddInts will use a for loop to sum all the odd.docx
 
Matlab programming- Write a function in Matlab with interface function.docx
Matlab programming- Write a function in Matlab with interface function.docxMatlab programming- Write a function in Matlab with interface function.docx
Matlab programming- Write a function in Matlab with interface function.docx
 
matrix norm For all column vectors x of dimension 2 x 1- can we say --.docx
matrix norm For all column vectors x of dimension 2 x 1- can we say --.docxmatrix norm For all column vectors x of dimension 2 x 1- can we say --.docx
matrix norm For all column vectors x of dimension 2 x 1- can we say --.docx
 
Materials purchased on account during the month amounted to $180-000-.docx
Materials purchased on account during the month amounted to $180-000-.docxMaterials purchased on account during the month amounted to $180-000-.docx
Materials purchased on account during the month amounted to $180-000-.docx
 
Match the following terms with the correct description below- a- oxida.docx
Match the following terms with the correct description below- a- oxida.docxMatch the following terms with the correct description below- a- oxida.docx
Match the following terms with the correct description below- a- oxida.docx
 
Material Science- What are the possible effects if you add a Dopant to.docx
Material Science- What are the possible effects if you add a Dopant to.docxMaterial Science- What are the possible effects if you add a Dopant to.docx
Material Science- What are the possible effects if you add a Dopant to.docx
 

Recently uploaded

3.21.24 The Origins of Black Power.pptx
3.21.24  The Origins of Black Power.pptx3.21.24  The Origins of Black Power.pptx
3.21.24 The Origins of Black Power.pptxmary850239
 
In - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxIn - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxAditiChauhan701637
 
HED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfHED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfMohonDas
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfYu Kanazawa / Osaka University
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17Celine George
 
The basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxThe basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxheathfieldcps1
 
Vani Magazine - Quarterly Magazine of Seshadripuram Educational Trust
Vani Magazine - Quarterly Magazine of Seshadripuram Educational TrustVani Magazine - Quarterly Magazine of Seshadripuram Educational Trust
Vani Magazine - Quarterly Magazine of Seshadripuram Educational TrustSavipriya Raghavendra
 
What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?TechSoup
 
The Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George WellsThe Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George WellsEugene Lysak
 
5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...CaraSkikne1
 
Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...raviapr7
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxraviapr7
 
Optical Fibre and It's Applications.pptx
Optical Fibre and It's Applications.pptxOptical Fibre and It's Applications.pptx
Optical Fibre and It's Applications.pptxPurva Nikam
 
CapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapitolTechU
 
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...Nguyen Thanh Tu Collection
 
Over the counter (OTC)- Sale, rational use.pptx
Over the counter (OTC)- Sale, rational use.pptxOver the counter (OTC)- Sale, rational use.pptx
Over the counter (OTC)- Sale, rational use.pptxraviapr7
 
Protein Structure - threading Protein modelling pptx
Protein Structure - threading Protein modelling pptxProtein Structure - threading Protein modelling pptx
Protein Structure - threading Protein modelling pptxvidhisharma994099
 
How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17Celine George
 

Recently uploaded (20)

3.21.24 The Origins of Black Power.pptx
3.21.24  The Origins of Black Power.pptx3.21.24  The Origins of Black Power.pptx
3.21.24 The Origins of Black Power.pptx
 
Finals of Kant get Marx 2.0 : a general politics quiz
Finals of Kant get Marx 2.0 : a general politics quizFinals of Kant get Marx 2.0 : a general politics quiz
Finals of Kant get Marx 2.0 : a general politics quiz
 
In - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxIn - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptx
 
HED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfHED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdf
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17
 
The basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxThe basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptx
 
Vani Magazine - Quarterly Magazine of Seshadripuram Educational Trust
Vani Magazine - Quarterly Magazine of Seshadripuram Educational TrustVani Magazine - Quarterly Magazine of Seshadripuram Educational Trust
Vani Magazine - Quarterly Magazine of Seshadripuram Educational Trust
 
What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?
 
The Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George WellsThe Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George Wells
 
5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...
 
Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptx
 
Optical Fibre and It's Applications.pptx
Optical Fibre and It's Applications.pptxOptical Fibre and It's Applications.pptx
Optical Fibre and It's Applications.pptx
 
Personal Resilience in Project Management 2 - TV Edit 1a.pdf
Personal Resilience in Project Management 2 - TV Edit 1a.pdfPersonal Resilience in Project Management 2 - TV Edit 1a.pdf
Personal Resilience in Project Management 2 - TV Edit 1a.pdf
 
CapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptx
 
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
 
Over the counter (OTC)- Sale, rational use.pptx
Over the counter (OTC)- Sale, rational use.pptxOver the counter (OTC)- Sale, rational use.pptx
Over the counter (OTC)- Sale, rational use.pptx
 
Protein Structure - threading Protein modelling pptx
Protein Structure - threading Protein modelling pptxProtein Structure - threading Protein modelling pptx
Protein Structure - threading Protein modelling pptx
 
How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17
 

Matlab programming- Create a matlab function titled my_sqrt(x) that ca.docx

  • 1. Matlab programming: Create a matlab function titled my_sqrt(x) that calculates the square root of x as the output WITHOUT USING MATLAB'S BUILTIN SQUARE ROOT FUNCTION OR THE POWER OPERATOR (^) PLEASE NOTE: you can only use matlab's arithmetic operations, logical operations, relational operations, conditional statements, loops( for loop, while loop), I/O (display, input()), scalars, matrices, and vectors to build this function. PLEASE KEEP IN MIND THAT YOU ARE NOT ALLOWED TO USE THE BUILTIN SQUARE ROOT FUNCTION OR THE POWER OPERATOR(^). Include comments throughout the program, explaining what you did. Also include a script file that shows one test case so that I can see what you did. Solution //function function [out] = my_sqrt[in] //check the value if value < 1 error ('need more data') end //square data out = in^0.5; end