How do I make a simple table in MatLab? Skew function?
4 ビュー (過去 30 日間)
古いコメントを表示
Hello. How can I make a table that displays the mean and median of "students" and "courses"?
Also, is there a way to calculate skew for "students" and "courses"?
table_a = readtable('Data1.xlsx')
mean (table_a.students);
median (table_a.students);
mean (table_a.courses);
median (table_a.courses);
%Calculate skew?
%Make/display a table of mean, median, and skew for students and courses
1 件のコメント
Arif Hoq
2023 年 2 月 9 日
table_a = readtable('Data1.xlsx')
average=mean(table_a.students)
median_value=median(table_a.courses)
skew_students=skewness(table_a.students)
skew_courses=skewness(table_a.courses)
採用された回答
Amal Raj
2023 年 2 月 9 日
編集済み: Amal Raj
2023 年 2 月 9 日
table_a = readtable('Data1.xlsx');
% Calculate mean, median, and skew
mean_students = mean(table_a.students);
median_students = median(table_a.students);
skew_students = skewness(table_a.students);
mean_courses = mean(table_a.courses);
median_courses = median(table_a.courses);
skew_courses = skewness(table_a.courses);
% Create table
table_data = {'Students', mean_students, median_students, skew_students;
'Courses', mean_courses, median_courses, skew_courses};
table = cell2table(table_data, 'VariableNames', {'Variable', 'Mean', 'Median', 'Skew'});
% Display table
disp(table)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Statistics and Machine Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!