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
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
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.