Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Matlab help! What do I do to display the given information? I've included the problem, the driver script I was given, and the file I

image text in transcribed

image text in transcribed

image text in transcribed

Matlab help! What do I do to display the given information? I've included the problem, the driver script I was given, and the file I am manipulating. Thank you so much!

4.2 printInfo Modify printInfo.m so that the function returns a cell array of strings that reports the names, heights, and final weights of the provided experiment subjects I The subjects' information will be provided in an array of structures Use sprintf 4.2.1 Example >> subjects.nameRyan'; subjects.id-0; subjects.weight -[ 134 145 ]; subjects.height.feet 6; subjects.height.inches0; for s - 2:4 subjects.namechar ( randi( 26 , 1 , randi( 10 ) ) + 96) subjects( s ).id - randi( 100); subjects s.weight - randi( 100 , 1 , 2) + 100; subjects( s ).height.feet- randi( 4 ) + 3; subjects s.height.inchesrandi( 12) -1; end >> printInfo( subjects ); >> ans ans 'Ryan: 6'0", 145 pounds' 1: 4'5", 180 pounds' qsthr: 5'11", 112 pounds' pftg: 7'6", 190 pounds' % script/Function Filename: printInfo.m % Purpose: Enter the purpose of the function/file here % Record of modifications : Programmer (s): Sara Smith Date Due: 2019-02-25 Date Submitted: 2019-02-25 References: ???2 Help Received: 2222 % Variables Used : ubjects Enter the purpose of the variable here) information Enter the purpose of the variable here) 8 Enter the other variables that you use here) function [ information 1 - printInfo ( subjects) end Date Due: YYYY-MM-DD Date Submitted: YYYY-MM-DD References: ???? Help Received: ???? % Variables Used: Enter the other variables that you use here) clear subjectsi subjects.name-char( randi( 26 , 1, randi( 10)) + 96) subjects.id - randi ( 100); subjects.weight-randi( 100 , 1, 2) + 100; subjects.height.feet-randi( 4 ) + 3; subjects.height.inches = randi( 12 ) -1; for s = 2 : randi ( 10 ) subjects( s).name- char ( randi ( 26, 1 , randi( 10 )) + 96 subjects ( s ).id = randi ( 100 ); subjects( s ).weight- randi( 100, 1,2) + 100; subjects( s ).height.feetrandi (4) + 3; subjects ( s ).height.inches = randi ( 12 )-1; end disp (subjects); yourInfo- printInfo ( subjects); for 1-l:length (yourIniO disp (yourInfoli]); end

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

More Books

Students also viewed these Databases questions

Question

What aspects would it be impossible to capture?

Answered: 1 week ago

Question

Enhance your words with effective presentation aids

Answered: 1 week ago