Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is the format of output we are looking for: Breast Cancer Colon Cancer Lung Cancer Epilepsy Bacterial Pneumonia Viral Pneumonia Myoplasma Pneumonia Coronary Artery
This is the format of output we are looking for: "Breast Cancer" "Colon Cancer" "Lung Cancer" "Epilepsy" "Bacterial Pneumonia" "Viral Pneumonia" "Myoplasma Pneumonia" "Coronary Artery Disease" The MATLAB functions that could be helpful are char, string, lower, upper, and strfind. Check MATLAB help for them. A good code is the one which works with a disease array with any length and with any number of words for a disease name.
Exercise 3.6 The file diseases.mat contains a variable called diseases, which is a string array containing names of different diseases. Currently some of the names are in upper case and some in lower case. Write a MATLAB script to read in these data, and convert all names so that they are in title case, i.e., the first letter of each word should be upper case and the rest lower case. Save the resulting string array in a new file called newdiseases.mat. 1x8 stringStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started