Question

Q 13.1 Given three vectors: n = [50 40 60] class ={ 'grade one' 'grade two'...

Q 13.1 Given three vectors:

n = [50 40 60]

class ={ 'grade one' 'grade two' 'grade three'}

score = [ 66.7 69.8 70.25]

Apply strcat() to create the following three strings all together :

There are 50 students in the grade one, the average score is 66.70

There are 40 students in the grade two, the average score is 69.80

There are 60 students in the grade three, the average score is 70.25

Note: Do not use sprintf(), do not use loop. You may need num2str() and strsplit().

I need help to solve this in MATLAB programming...

Homework Answers

Answer #1

MATLAB CODE:-

n = [50 40 60];
nn = num2str(n);
C = strsplit(nn);
class ={ 'grade one' 'grade two' 'grade three'};
score = [66.7, 69.8 ,70.25] ;
ss = num2str(score);
Cc = strsplit(ss);
s = strcat({' There are ' } , C ,{ ' students in ' } , class , { ' the average score is ' } , Cc)

screenshot of code and result:-

kindly like if you find it needfull..please comment for further elaboration

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
In what follows use any of the following tests/procedures: Regression, confidence intervals, one-sided t-test, or two-sided...
In what follows use any of the following tests/procedures: Regression, confidence intervals, one-sided t-test, or two-sided t-test. The procedures should be done with 5% P-value or 95% confidence interval. # of OpenLab visits Final grade 2 40 8 85 10 80 9 84 15 90 7 72 5 50 4 59 8 85 10 70 7 66 7 70 5 63 4 60 4 59 11 79 3 82 9 90 10 82 9 76 14 85 6 73 5...
Pandora is the Internet’s most successful subscription radio service. As of June 2013, it had over...
Pandora is the Internet’s most successful subscription radio service. As of June 2013, it had over 200 million registered users (140 million of which access the service via a mobile device) and over 70 million active listeners. Pandora now accounts for more than 70% of all Internet radio listening hours and a 7% share of total U.S. radio listening (both traditional and Internet). At Pandora, users select a genre of music based on a favorite musician, and a computer algorithm...
What tools could AA leaders have used to increase their awareness of internal and external issues?...
What tools could AA leaders have used to increase their awareness of internal and external issues? ???ALASKA AIRLINES: NAVIGATING CHANGE In the autumn of 2007, Alaska Airlines executives adjourned at the end of a long and stressful day in the midst of a multi-day strategic planning session. Most headed outside to relax, unwind and enjoy a bonfire on the shore of Semiahmoo Spit, outside the meeting venue in Blaine, a seaport town in northwest Washington state. Meanwhile, several members of...
Delta airlines case study Global strategy. Describe the current global strategy and provide evidence about how...
Delta airlines case study Global strategy. Describe the current global strategy and provide evidence about how the firms resources incompetencies support the given pressures regarding costs and local responsiveness. Describe entry modes have they usually used, and whether they are appropriate for the given strategy. Any key issues in their global strategy? casestudy: Atlanta, June 17, 2014. Sea of Delta employees and their families swarmed between food trucks, amusement park booths, and entertainment venues that were scattered throughout what would...