SlideShare une entreprise Scribd logo
1  sur  1
MATLAB:
In this exercise, we will work with two string related functions lower and upper. Use the help
command to learn the basic usage of the two functions. Then develop a script to convert an input
word to a specific format. For example, if the user entered 'o'conner, 'OCONNOR, or oconner,
the script will generate 'OConnor for all those input words. Focus on applying the two functions
and array element access to form the statements.
Solution
stringToConvert = input('Please enter string to covert to special format: ', 's');
outputString = [upper(stringToConvert(1:2)) lower(stringToConvert(3:end))];
display(outputString);
OUTPUT:
Please enter string to covert to special format: sameer
outputString = SAmeer

Contenu connexe

Plus de maryi15

Name two specific non-manufacturing costs that might be included in ac.docx
Name two specific non-manufacturing costs that might be included in ac.docxName two specific non-manufacturing costs that might be included in ac.docx
Name two specific non-manufacturing costs that might be included in ac.docxmaryi15
 
Name seven (7) characteristics that impact the design of a foundation-.docx
Name seven (7) characteristics that impact the design of a foundation-.docxName seven (7) characteristics that impact the design of a foundation-.docx
Name seven (7) characteristics that impact the design of a foundation-.docxmaryi15
 
Name some of the problems the ARC has encountered with handling donati.docx
Name some of the problems the ARC has encountered with handling donati.docxName some of the problems the ARC has encountered with handling donati.docx
Name some of the problems the ARC has encountered with handling donati.docxmaryi15
 
Name and briefly describe three different uses for interrupts-Solution.docx
Name and briefly describe three different uses for interrupts-Solution.docxName and briefly describe three different uses for interrupts-Solution.docx
Name and briefly describe three different uses for interrupts-Solution.docxmaryi15
 
Name Problem # 2 ( 2e prs ) anging not straight down- but at an angle.docx
Name Problem # 2 ( 2e prs ) anging not straight down- but at an angle.docxName Problem # 2 ( 2e prs ) anging not straight down- but at an angle.docx
Name Problem # 2 ( 2e prs ) anging not straight down- but at an angle.docxmaryi15
 
nalyze and explain why it is important for management to provide emplo.docx
nalyze and explain why it is important for management to provide emplo.docxnalyze and explain why it is important for management to provide emplo.docx
nalyze and explain why it is important for management to provide emplo.docxmaryi15
 
myctfitemView-offset-next&assignmentProblemID-- 103375190 Based on pos.docx
myctfitemView-offset-next&assignmentProblemID-- 103375190 Based on pos.docxmyctfitemView-offset-next&assignmentProblemID-- 103375190 Based on pos.docx
myctfitemView-offset-next&assignmentProblemID-- 103375190 Based on pos.docxmaryi15
 
Mrs- F has invited several wives of delegates to the United Nations fo.docx
Mrs- F has invited several wives of delegates to the United Nations fo.docxMrs- F has invited several wives of delegates to the United Nations fo.docx
Mrs- F has invited several wives of delegates to the United Nations fo.docxmaryi15
 
Match the Interface with its most efficient implementation- Map- TreeM.docx
Match the Interface with its most efficient implementation- Map- TreeM.docxMatch the Interface with its most efficient implementation- Map- TreeM.docx
Match the Interface with its most efficient implementation- Map- TreeM.docxmaryi15
 
My Notes Ask Your Teach Two identical diverging lenses are separated b.docx
My Notes Ask Your Teach Two identical diverging lenses are separated b.docxMy Notes Ask Your Teach Two identical diverging lenses are separated b.docx
My Notes Ask Your Teach Two identical diverging lenses are separated b.docxmaryi15
 
My Notes Ask Your Tesch away using a camera that has a lens with a foc.docx
My Notes Ask Your Tesch away using a camera that has a lens with a foc.docxMy Notes Ask Your Tesch away using a camera that has a lens with a foc.docx
My Notes Ask Your Tesch away using a camera that has a lens with a foc.docxmaryi15
 
MUS101 Women made huge steps for being recognized musically in the Rom.docx
MUS101 Women made huge steps for being recognized musically in the Rom.docxMUS101 Women made huge steps for being recognized musically in the Rom.docx
MUS101 Women made huge steps for being recognized musically in the Rom.docxmaryi15
 
MUS101 What musical techniques did Vivaldi use in La Primavera to depi.docx
MUS101 What musical techniques did Vivaldi use in La Primavera to depi.docxMUS101 What musical techniques did Vivaldi use in La Primavera to depi.docx
MUS101 What musical techniques did Vivaldi use in La Primavera to depi.docxmaryi15
 
MUS101 Women made huge steps for being recognized musically in the Rom (1).docx
MUS101 Women made huge steps for being recognized musically in the Rom (1).docxMUS101 Women made huge steps for being recognized musically in the Rom (1).docx
MUS101 Women made huge steps for being recognized musically in the Rom (1).docxmaryi15
 
Music 101 How does an Oratorio differ from an Opera- How is it similar.docx
Music 101 How does an Oratorio differ from an Opera- How is it similar.docxMusic 101 How does an Oratorio differ from an Opera- How is it similar.docx
Music 101 How does an Oratorio differ from an Opera- How is it similar.docxmaryi15
 
MUS101 Discuss the importance of the Patronage System in the Classical.docx
MUS101 Discuss the importance of the Patronage System in the Classical.docxMUS101 Discuss the importance of the Patronage System in the Classical.docx
MUS101 Discuss the importance of the Patronage System in the Classical.docxmaryi15
 
Multiple choice- circle the best responses below a) The element most e.docx
Multiple choice- circle the best responses below a) The element most e.docxMultiple choice- circle the best responses below a) The element most e.docx
Multiple choice- circle the best responses below a) The element most e.docxmaryi15
 
Monitor is one of the concurrency mechanisms- It is usually a piece of.docx
Monitor is one of the concurrency mechanisms- It is usually a piece of.docxMonitor is one of the concurrency mechanisms- It is usually a piece of.docx
Monitor is one of the concurrency mechanisms- It is usually a piece of.docxmaryi15
 
Mini Corp- acquires a patent from Maxi Co- in exchange for 2-500 share.docx
Mini Corp- acquires a patent from Maxi Co- in exchange for 2-500 share.docxMini Corp- acquires a patent from Maxi Co- in exchange for 2-500 share.docx
Mini Corp- acquires a patent from Maxi Co- in exchange for 2-500 share.docxmaryi15
 
Modern comparative economists would object to the definition of econom.docx
Modern comparative economists would object to the definition of econom.docxModern comparative economists would object to the definition of econom.docx
Modern comparative economists would object to the definition of econom.docxmaryi15
 

Plus de maryi15 (20)

Name two specific non-manufacturing costs that might be included in ac.docx
Name two specific non-manufacturing costs that might be included in ac.docxName two specific non-manufacturing costs that might be included in ac.docx
Name two specific non-manufacturing costs that might be included in ac.docx
 
Name seven (7) characteristics that impact the design of a foundation-.docx
Name seven (7) characteristics that impact the design of a foundation-.docxName seven (7) characteristics that impact the design of a foundation-.docx
Name seven (7) characteristics that impact the design of a foundation-.docx
 
Name some of the problems the ARC has encountered with handling donati.docx
Name some of the problems the ARC has encountered with handling donati.docxName some of the problems the ARC has encountered with handling donati.docx
Name some of the problems the ARC has encountered with handling donati.docx
 
Name and briefly describe three different uses for interrupts-Solution.docx
Name and briefly describe three different uses for interrupts-Solution.docxName and briefly describe three different uses for interrupts-Solution.docx
Name and briefly describe three different uses for interrupts-Solution.docx
 
Name Problem # 2 ( 2e prs ) anging not straight down- but at an angle.docx
Name Problem # 2 ( 2e prs ) anging not straight down- but at an angle.docxName Problem # 2 ( 2e prs ) anging not straight down- but at an angle.docx
Name Problem # 2 ( 2e prs ) anging not straight down- but at an angle.docx
 
nalyze and explain why it is important for management to provide emplo.docx
nalyze and explain why it is important for management to provide emplo.docxnalyze and explain why it is important for management to provide emplo.docx
nalyze and explain why it is important for management to provide emplo.docx
 
myctfitemView-offset-next&assignmentProblemID-- 103375190 Based on pos.docx
myctfitemView-offset-next&assignmentProblemID-- 103375190 Based on pos.docxmyctfitemView-offset-next&assignmentProblemID-- 103375190 Based on pos.docx
myctfitemView-offset-next&assignmentProblemID-- 103375190 Based on pos.docx
 
Mrs- F has invited several wives of delegates to the United Nations fo.docx
Mrs- F has invited several wives of delegates to the United Nations fo.docxMrs- F has invited several wives of delegates to the United Nations fo.docx
Mrs- F has invited several wives of delegates to the United Nations fo.docx
 
Match the Interface with its most efficient implementation- Map- TreeM.docx
Match the Interface with its most efficient implementation- Map- TreeM.docxMatch the Interface with its most efficient implementation- Map- TreeM.docx
Match the Interface with its most efficient implementation- Map- TreeM.docx
 
My Notes Ask Your Teach Two identical diverging lenses are separated b.docx
My Notes Ask Your Teach Two identical diverging lenses are separated b.docxMy Notes Ask Your Teach Two identical diverging lenses are separated b.docx
My Notes Ask Your Teach Two identical diverging lenses are separated b.docx
 
My Notes Ask Your Tesch away using a camera that has a lens with a foc.docx
My Notes Ask Your Tesch away using a camera that has a lens with a foc.docxMy Notes Ask Your Tesch away using a camera that has a lens with a foc.docx
My Notes Ask Your Tesch away using a camera that has a lens with a foc.docx
 
MUS101 Women made huge steps for being recognized musically in the Rom.docx
MUS101 Women made huge steps for being recognized musically in the Rom.docxMUS101 Women made huge steps for being recognized musically in the Rom.docx
MUS101 Women made huge steps for being recognized musically in the Rom.docx
 
MUS101 What musical techniques did Vivaldi use in La Primavera to depi.docx
MUS101 What musical techniques did Vivaldi use in La Primavera to depi.docxMUS101 What musical techniques did Vivaldi use in La Primavera to depi.docx
MUS101 What musical techniques did Vivaldi use in La Primavera to depi.docx
 
MUS101 Women made huge steps for being recognized musically in the Rom (1).docx
MUS101 Women made huge steps for being recognized musically in the Rom (1).docxMUS101 Women made huge steps for being recognized musically in the Rom (1).docx
MUS101 Women made huge steps for being recognized musically in the Rom (1).docx
 
Music 101 How does an Oratorio differ from an Opera- How is it similar.docx
Music 101 How does an Oratorio differ from an Opera- How is it similar.docxMusic 101 How does an Oratorio differ from an Opera- How is it similar.docx
Music 101 How does an Oratorio differ from an Opera- How is it similar.docx
 
MUS101 Discuss the importance of the Patronage System in the Classical.docx
MUS101 Discuss the importance of the Patronage System in the Classical.docxMUS101 Discuss the importance of the Patronage System in the Classical.docx
MUS101 Discuss the importance of the Patronage System in the Classical.docx
 
Multiple choice- circle the best responses below a) The element most e.docx
Multiple choice- circle the best responses below a) The element most e.docxMultiple choice- circle the best responses below a) The element most e.docx
Multiple choice- circle the best responses below a) The element most e.docx
 
Monitor is one of the concurrency mechanisms- It is usually a piece of.docx
Monitor is one of the concurrency mechanisms- It is usually a piece of.docxMonitor is one of the concurrency mechanisms- It is usually a piece of.docx
Monitor is one of the concurrency mechanisms- It is usually a piece of.docx
 
Mini Corp- acquires a patent from Maxi Co- in exchange for 2-500 share.docx
Mini Corp- acquires a patent from Maxi Co- in exchange for 2-500 share.docxMini Corp- acquires a patent from Maxi Co- in exchange for 2-500 share.docx
Mini Corp- acquires a patent from Maxi Co- in exchange for 2-500 share.docx
 
Modern comparative economists would object to the definition of econom.docx
Modern comparative economists would object to the definition of econom.docxModern comparative economists would object to the definition of econom.docx
Modern comparative economists would object to the definition of econom.docx
 

Dernier

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 

Dernier (20)

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 

MATLAB- In this exercise- we will work with two string related functio.docx

  • 1. MATLAB: In this exercise, we will work with two string related functions lower and upper. Use the help command to learn the basic usage of the two functions. Then develop a script to convert an input word to a specific format. For example, if the user entered 'o'conner, 'OCONNOR, or oconner, the script will generate 'OConnor for all those input words. Focus on applying the two functions and array element access to form the statements. Solution stringToConvert = input('Please enter string to covert to special format: ', 's'); outputString = [upper(stringToConvert(1:2)) lower(stringToConvert(3:end))]; display(outputString); OUTPUT: Please enter string to covert to special format: sameer outputString = SAmeer