SlideShare a Scribd company logo
1. Suppose you are given a variable X and you are asked to check whether its content is real or
complex. Based on what you have learnt in this lab, propose two different ways, using two
different MATLAB built-in functions, to perform the test. 2. Find the content of matrix B which
is the output of the following piece of code:
Solution
1.
>> X=input('Enter any number:');
t=isreal(X)
if t==1
disp('entered number is real')
else
disp('entered number is complex')
end
Enter any number:3+3i
t =
0
entered number is complex
>> X=input('Enter any number:');
t=isreal(X)
if t==1
disp('entered number is real')
else
disp('entered number is complex')
end
Enter any number:4
t =
1
entered number is real
2.
A=cos([pi/2, pi, 0; 2*pi,-pi, 3*pi/2]);
if A(1,3)==1 || A(3)>0
B=A+1
else
B=3*A
end
B =
1.0000Â Â Â Â Â Â Â Â 0Â Â Â 2.0000
2.0000Â Â Â Â Â Â Â Â 0Â Â Â 1.0000

More Related Content

Similar to 1- Suppose you are given a variable X and you are asked to check wheth.docx

III_Data Structure_Module_1.ppt
III_Data Structure_Module_1.pptIII_Data Structure_Module_1.ppt
III_Data Structure_Module_1.pptshashankbhadouria4
 
III_Data Structure_Module_1.pptx
III_Data Structure_Module_1.pptxIII_Data Structure_Module_1.pptx
III_Data Structure_Module_1.pptxshashankbhadouria4
 
Data types in python
Data types in pythonData types in python
Data types in pythonRaginiJain21
 
Group p1
Group p1Group p1
Group p1IIUM
 
A MATLAB project on LCR circuits
A MATLAB project on LCR circuitsA MATLAB project on LCR circuits
A MATLAB project on LCR circuitssvrohith 9
 
Introduction to biopython
Introduction to biopythonIntroduction to biopython
Introduction to biopythonSuhad Jihad
 
LeetCode April Coding Challenge
LeetCode April Coding ChallengeLeetCode April Coding Challenge
LeetCode April Coding ChallengeSunil Yadav
 
chapter1.pdf ......................................
chapter1.pdf ......................................chapter1.pdf ......................................
chapter1.pdf ......................................nourhandardeer3
 
Python High Level Functions_Ch 11.ppt
Python High Level Functions_Ch 11.pptPython High Level Functions_Ch 11.ppt
Python High Level Functions_Ch 11.pptAnishaJ7
 
C++ Programming Homework Help
C++ Programming Homework HelpC++ Programming Homework Help
C++ Programming Homework HelpC++ Homework Help
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlabBilawalBaloch1
 
Java code to find the closest pair using divide and conquer algorith.pdf
Java code to find the closest pair using divide and conquer algorith.pdfJava code to find the closest pair using divide and conquer algorith.pdf
Java code to find the closest pair using divide and conquer algorith.pdffashioncollection2
 

Similar to 1- Suppose you are given a variable X and you are asked to check wheth.docx (20)

III_Data Structure_Module_1.ppt
III_Data Structure_Module_1.pptIII_Data Structure_Module_1.ppt
III_Data Structure_Module_1.ppt
 
algorithm Unit 2
algorithm Unit 2 algorithm Unit 2
algorithm Unit 2
 
Unit 2 in daa
Unit 2 in daaUnit 2 in daa
Unit 2 in daa
 
III_Data Structure_Module_1.pptx
III_Data Structure_Module_1.pptxIII_Data Structure_Module_1.pptx
III_Data Structure_Module_1.pptx
 
Day2
Day2Day2
Day2
 
Data types in python
Data types in pythonData types in python
Data types in python
 
Group p1
Group p1Group p1
Group p1
 
A MATLAB project on LCR circuits
A MATLAB project on LCR circuitsA MATLAB project on LCR circuits
A MATLAB project on LCR circuits
 
Introduction to biopython
Introduction to biopythonIntroduction to biopython
Introduction to biopython
 
Lecture2
Lecture2Lecture2
Lecture2
 
LeetCode April Coding Challenge
LeetCode April Coding ChallengeLeetCode April Coding Challenge
LeetCode April Coding Challenge
 
chapter1.pdf ......................................
chapter1.pdf ......................................chapter1.pdf ......................................
chapter1.pdf ......................................
 
Python High Level Functions_Ch 11.ppt
Python High Level Functions_Ch 11.pptPython High Level Functions_Ch 11.ppt
Python High Level Functions_Ch 11.ppt
 
Array
ArrayArray
Array
 
C++ Programming Homework Help
C++ Programming Homework HelpC++ Programming Homework Help
C++ Programming Homework Help
 
Hashing
HashingHashing
Hashing
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Jeop game-final-review
Jeop game-final-reviewJeop game-final-review
Jeop game-final-review
 
611+tutorial
611+tutorial611+tutorial
611+tutorial
 
Java code to find the closest pair using divide and conquer algorith.pdf
Java code to find the closest pair using divide and conquer algorith.pdfJava code to find the closest pair using divide and conquer algorith.pdf
Java code to find the closest pair using divide and conquer algorith.pdf
 

More from tjames442

A star is 17-2 ly (light-years) from Earth- HINT (a) At what constant.docx
A star is 17-2 ly (light-years) from Earth- HINT (a) At what constant.docxA star is 17-2 ly (light-years) from Earth- HINT (a) At what constant.docx
A star is 17-2 ly (light-years) from Earth- HINT (a) At what constant.docxtjames442
 
A true statement about atoms is that they can emit radiation at freque.docx
A true statement about atoms is that they can emit radiation at freque.docxA true statement about atoms is that they can emit radiation at freque.docx
A true statement about atoms is that they can emit radiation at freque.docxtjames442
 
A TDR price of a length of 60 centimeters was installed vertically int.docx
A TDR price of a length of 60 centimeters was installed vertically int.docxA TDR price of a length of 60 centimeters was installed vertically int.docx
A TDR price of a length of 60 centimeters was installed vertically int.docxtjames442
 
1- The real interest rate is defined as- A- inflation minus the nomina.docx
1- The real interest rate is defined as- A- inflation minus the nomina.docx1- The real interest rate is defined as- A- inflation minus the nomina.docx
1- The real interest rate is defined as- A- inflation minus the nomina.docxtjames442
 
1- The intNumbers array is a one dimensional array- Write the statemen.docx
1- The intNumbers array is a one dimensional array- Write the statemen.docx1- The intNumbers array is a one dimensional array- Write the statemen.docx
1- The intNumbers array is a one dimensional array- Write the statemen.docxtjames442
 
1- The following data were reported by a corporation- Authorized share.docx
1- The following data were reported by a corporation- Authorized share.docx1- The following data were reported by a corporation- Authorized share.docx
1- The following data were reported by a corporation- Authorized share.docxtjames442
 
1- The following change is physical or chemical- Explain why- Water bo.docx
1- The following change is physical or chemical- Explain why- Water bo.docx1- The following change is physical or chemical- Explain why- Water bo.docx
1- The following change is physical or chemical- Explain why- Water bo.docxtjames442
 
1- Which of the following is a situation in which an involuntary trans.docx
1- Which of the following is a situation in which an involuntary trans.docx1- Which of the following is a situation in which an involuntary trans.docx
1- Which of the following is a situation in which an involuntary trans.docxtjames442
 
1- Which of the following is NOT a function of a firewall- a- Blocks o.docx
1- Which of the following is NOT a function of a firewall- a- Blocks o.docx1- Which of the following is NOT a function of a firewall- a- Blocks o.docx
1- Which of the following is NOT a function of a firewall- a- Blocks o.docxtjames442
 
1- What soil characteristics influence compressibility 2- Why is conso.docx
1- What soil characteristics influence compressibility 2- Why is conso.docx1- What soil characteristics influence compressibility 2- Why is conso.docx
1- What soil characteristics influence compressibility 2- Why is conso.docxtjames442
 
1- What type of encryption does PKI use- Symmetric Asymmetric DES AES.docx
1- What type of encryption does PKI use- Symmetric Asymmetric DES AES.docx1- What type of encryption does PKI use- Symmetric Asymmetric DES AES.docx
1- What type of encryption does PKI use- Symmetric Asymmetric DES AES.docxtjames442
 
1- What kind of contract did Lulene and Ellen have- What kinds of issu.docx
1- What kind of contract did Lulene and Ellen have- What kinds of issu.docx1- What kind of contract did Lulene and Ellen have- What kinds of issu.docx
1- What kind of contract did Lulene and Ellen have- What kinds of issu.docxtjames442
 
1- what is the net ionic equation for the neutralization of HBr with K.docx
1- what is the net ionic equation for the neutralization of HBr with K.docx1- what is the net ionic equation for the neutralization of HBr with K.docx
1- what is the net ionic equation for the neutralization of HBr with K.docxtjames442
 
1- What is outsourcing- What are advantages and disadvantages of outso.docx
1- What is outsourcing- What are advantages and disadvantages of outso.docx1- What is outsourcing- What are advantages and disadvantages of outso.docx
1- What is outsourcing- What are advantages and disadvantages of outso.docxtjames442
 
1- What is the difference between OSI and TCP-IP layered models-Soluti.docx
1- What is the difference between OSI and TCP-IP layered models-Soluti.docx1- What is the difference between OSI and TCP-IP layered models-Soluti.docx
1- What is the difference between OSI and TCP-IP layered models-Soluti.docxtjames442
 
1- What is a database- Give some examples- 2- What is a database manag.docx
1- What is a database- Give some examples- 2- What is a database manag.docx1- What is a database- Give some examples- 2- What is a database manag.docx
1- What is a database- Give some examples- 2- What is a database manag.docxtjames442
 
1- What are the functional sources of power- 2- Distinguish between pe.docx
1- What are the functional sources of power- 2- Distinguish between pe.docx1- What are the functional sources of power- 2- Distinguish between pe.docx
1- What are the functional sources of power- 2- Distinguish between pe.docxtjames442
 
1- What are phonons- What information can be obtained by studying the.docx
1- What are phonons- What information can be obtained by studying the.docx1- What are phonons- What information can be obtained by studying the.docx
1- What are phonons- What information can be obtained by studying the.docxtjames442
 
1- void fun(int &j) { j++- } int main() { int i - 20- fun(i)- printf(-.docx
1- void fun(int &j) { j++- } int main() { int i - 20- fun(i)- printf(-.docx1- void fun(int &j) { j++- } int main() { int i - 20- fun(i)- printf(-.docx
1- void fun(int &j) { j++- } int main() { int i - 20- fun(i)- printf(-.docxtjames442
 
1- Single convex lenses can be used to make images of far away objects.docx
1- Single convex lenses can be used to make images of far away objects.docx1- Single convex lenses can be used to make images of far away objects.docx
1- Single convex lenses can be used to make images of far away objects.docxtjames442
 

More from tjames442 (20)

A star is 17-2 ly (light-years) from Earth- HINT (a) At what constant.docx
A star is 17-2 ly (light-years) from Earth- HINT (a) At what constant.docxA star is 17-2 ly (light-years) from Earth- HINT (a) At what constant.docx
A star is 17-2 ly (light-years) from Earth- HINT (a) At what constant.docx
 
A true statement about atoms is that they can emit radiation at freque.docx
A true statement about atoms is that they can emit radiation at freque.docxA true statement about atoms is that they can emit radiation at freque.docx
A true statement about atoms is that they can emit radiation at freque.docx
 
A TDR price of a length of 60 centimeters was installed vertically int.docx
A TDR price of a length of 60 centimeters was installed vertically int.docxA TDR price of a length of 60 centimeters was installed vertically int.docx
A TDR price of a length of 60 centimeters was installed vertically int.docx
 
1- The real interest rate is defined as- A- inflation minus the nomina.docx
1- The real interest rate is defined as- A- inflation minus the nomina.docx1- The real interest rate is defined as- A- inflation minus the nomina.docx
1- The real interest rate is defined as- A- inflation minus the nomina.docx
 
1- The intNumbers array is a one dimensional array- Write the statemen.docx
1- The intNumbers array is a one dimensional array- Write the statemen.docx1- The intNumbers array is a one dimensional array- Write the statemen.docx
1- The intNumbers array is a one dimensional array- Write the statemen.docx
 
1- The following data were reported by a corporation- Authorized share.docx
1- The following data were reported by a corporation- Authorized share.docx1- The following data were reported by a corporation- Authorized share.docx
1- The following data were reported by a corporation- Authorized share.docx
 
1- The following change is physical or chemical- Explain why- Water bo.docx
1- The following change is physical or chemical- Explain why- Water bo.docx1- The following change is physical or chemical- Explain why- Water bo.docx
1- The following change is physical or chemical- Explain why- Water bo.docx
 
1- Which of the following is a situation in which an involuntary trans.docx
1- Which of the following is a situation in which an involuntary trans.docx1- Which of the following is a situation in which an involuntary trans.docx
1- Which of the following is a situation in which an involuntary trans.docx
 
1- Which of the following is NOT a function of a firewall- a- Blocks o.docx
1- Which of the following is NOT a function of a firewall- a- Blocks o.docx1- Which of the following is NOT a function of a firewall- a- Blocks o.docx
1- Which of the following is NOT a function of a firewall- a- Blocks o.docx
 
1- What soil characteristics influence compressibility 2- Why is conso.docx
1- What soil characteristics influence compressibility 2- Why is conso.docx1- What soil characteristics influence compressibility 2- Why is conso.docx
1- What soil characteristics influence compressibility 2- Why is conso.docx
 
1- What type of encryption does PKI use- Symmetric Asymmetric DES AES.docx
1- What type of encryption does PKI use- Symmetric Asymmetric DES AES.docx1- What type of encryption does PKI use- Symmetric Asymmetric DES AES.docx
1- What type of encryption does PKI use- Symmetric Asymmetric DES AES.docx
 
1- What kind of contract did Lulene and Ellen have- What kinds of issu.docx
1- What kind of contract did Lulene and Ellen have- What kinds of issu.docx1- What kind of contract did Lulene and Ellen have- What kinds of issu.docx
1- What kind of contract did Lulene and Ellen have- What kinds of issu.docx
 
1- what is the net ionic equation for the neutralization of HBr with K.docx
1- what is the net ionic equation for the neutralization of HBr with K.docx1- what is the net ionic equation for the neutralization of HBr with K.docx
1- what is the net ionic equation for the neutralization of HBr with K.docx
 
1- What is outsourcing- What are advantages and disadvantages of outso.docx
1- What is outsourcing- What are advantages and disadvantages of outso.docx1- What is outsourcing- What are advantages and disadvantages of outso.docx
1- What is outsourcing- What are advantages and disadvantages of outso.docx
 
1- What is the difference between OSI and TCP-IP layered models-Soluti.docx
1- What is the difference between OSI and TCP-IP layered models-Soluti.docx1- What is the difference between OSI and TCP-IP layered models-Soluti.docx
1- What is the difference between OSI and TCP-IP layered models-Soluti.docx
 
1- What is a database- Give some examples- 2- What is a database manag.docx
1- What is a database- Give some examples- 2- What is a database manag.docx1- What is a database- Give some examples- 2- What is a database manag.docx
1- What is a database- Give some examples- 2- What is a database manag.docx
 
1- What are the functional sources of power- 2- Distinguish between pe.docx
1- What are the functional sources of power- 2- Distinguish between pe.docx1- What are the functional sources of power- 2- Distinguish between pe.docx
1- What are the functional sources of power- 2- Distinguish between pe.docx
 
1- What are phonons- What information can be obtained by studying the.docx
1- What are phonons- What information can be obtained by studying the.docx1- What are phonons- What information can be obtained by studying the.docx
1- What are phonons- What information can be obtained by studying the.docx
 
1- void fun(int &j) { j++- } int main() { int i - 20- fun(i)- printf(-.docx
1- void fun(int &j) { j++- } int main() { int i - 20- fun(i)- printf(-.docx1- void fun(int &j) { j++- } int main() { int i - 20- fun(i)- printf(-.docx
1- void fun(int &j) { j++- } int main() { int i - 20- fun(i)- printf(-.docx
 
1- Single convex lenses can be used to make images of far away objects.docx
1- Single convex lenses can be used to make images of far away objects.docx1- Single convex lenses can be used to make images of far away objects.docx
1- Single convex lenses can be used to make images of far away objects.docx
 

Recently uploaded

Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...Nguyen Thanh Tu Collection
 
Gyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxGyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxShibin Azad
 
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 17Celine George
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...Nguyen Thanh Tu Collection
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345beazzy04
 
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 eyesashishpaul799
 
The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...sanghavirahi2
 
Open Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointOpen Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointELaRue0
 
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.pptxjmorse8
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfbu07226
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfQucHHunhnh
 
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.pdff17thcssbs2
 
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 QuizPragya - UEM Kolkata Quiz Club
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxbennyroshan06
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxakshayaramakrishnan21
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXMIRIAMSALINAS13
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfVivekanand Anglo Vedic Academy
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxCapitolTechU
 

Recently uploaded (20)

Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Gyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxGyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptx
 
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
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
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
 
The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...
 
Open Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointOpen Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPoint
 
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
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
 
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
 
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
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
 

1- Suppose you are given a variable X and you are asked to check wheth.docx

  • 1. 1. Suppose you are given a variable X and you are asked to check whether its content is real or complex. Based on what you have learnt in this lab, propose two different ways, using two different MATLAB built-in functions, to perform the test. 2. Find the content of matrix B which is the output of the following piece of code: Solution 1. >> X=input('Enter any number:'); t=isreal(X) if t==1 disp('entered number is real') else disp('entered number is complex') end Enter any number:3+3i t = 0 entered number is complex >> X=input('Enter any number:'); t=isreal(X) if t==1 disp('entered number is real') else disp('entered number is complex') end Enter any number:4 t = 1
  • 2. entered number is real 2. A=cos([pi/2, pi, 0; 2*pi,-pi, 3*pi/2]); if A(1,3)==1 || A(3)>0 B=A+1 else B=3*A end B = 1.0000Â Â Â Â Â Â Â Â 0Â Â Â 2.0000 2.0000Â Â Â Â Â Â Â Â 0Â Â Â 1.0000