Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

can you please give me the code which is use in matlab software for this questio

ID: 1767107 • Letter: C

Question


can you please give me the code which is use in matlab software for this question thanks

Make sure your Full Name, Class Name, and Class Section is at the top of the script you submit. The file US_Presidents.xlsx can be found in the Extra Files section on Blackboard cartalk.txt and Problem 1 This Problem is worth 2 points Load up the MATLAB dataset patients. a. Create a Table using all of the variables imported for this dataset b. Export this to an Excel Spreadsheet C. Describe what the MATLAB function summary does and how you could use it to quickly analyze the data. Then, use it to summarize the patients dataset. Problem 2

Explanation / Answer

ANSWER TO a ,b&c

MATLAB CODE:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

load patients.mat %%%%loading default data from patients.mat

T=table(LastName,Age,Weight,Smoker);

T(1:5,:)

summary(T)%%%%summary is used to view data types,dscription,units and other statistics to summarize the table

filename='patientdata.xlsx';

writetable(T,filename,'sheet',1,'Range','D1')

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

OUTPUT:

ans =

LastName Age Weight Smoker

__________ ___ ______ ______

'Smith' 38 176 true  

'Johnson' 43 163 false

'Williams' 38 131 false

'Jones' 40 133 false

'Brown' 49 119 false

Variables:

LastName: 100x1 cell string

Age: 100x1 double

Values:

min 25

median 39

max 50

Weight: 100x1 double

Values:

min 111

median 142.5

max 202

Smoker: 100x1 logical

Values:

true 34   

false 66   

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote