当前位置:网站首页>Matlab exercises -- basic data processing
Matlab exercises -- basic data processing
2022-06-28 04:27:00 【Fanyi】
matlab Series articles : Catalog
List of articles
- One 、 subject
- Two 、 answer
- 1. Reading data
- 2. Calculating mean
- 3. Variance estimation
- 4. Find standard deviation
- 5. For maximum
- 6. For the minimum
- 7. Seeking the range
- 8. Find the median
- 9. Find the quantile
- 10. The number of
- 11. Coefficient of variation
- 12. The moment of origin
- 13. Center distance
- 14. Seeking skewness
- 14. kurtosis
- 15. Covariance and correlation coefficient of the data in the first and second columns
One 、 subject
Read the attachment sd.xlsx, Calculate the following statistics :
- mean value
- variance
- Standard deviation
- Maximum
- minimum value
- range
- Median
- quantile
- The number of
- Coefficient of variation
- The moment of origin
- Center distance
- skewness
- kurtosis ( The above calculation sd In the first column )
- Covariance and correlation coefficient of the data in the first and second columns
Resource link :https://download.csdn.net/download/qq_21484461/85801116?spm=1001.2014.3001.5503
Two 、 answer
1. Reading data
>> [num1]=xlsread('F:\sd.xlsx',1,'A1:B191') % Before reading 1、2 Column
>>
>> [num2]=xlsread('F:\sd.xlsx',1,'D1:E191') % Before reading 4、5 Column
>>
>> [num3]=xlsread('F:\sd.xlsx',1,'G1:H40') % Before reading 7、8 Column
2. Calculating mean
>> mean(num1(:,[1]))
ans =
2.9634
3. Variance estimation
>> var(num1(:,[1]))
ans =
0.9337
4. Find standard deviation
>> std(num1(:,[1]))
ans =
0.9663
5. For maximum
>> max(num1(:,[1]))
ans =
6.4000
6. For the minimum
>> min(num1(:,[1]))
ans =
0.5000
7. Seeking the range
>> max(num1(:,[1]))-min(num1(:,[1]))
ans =
5.9000
8. Find the median
>> median(num1(:,[1]))
ans =
2.8000
9. Find the quantile
>> prctile(num1(:,[1]),40) %40 quantile
ans =
2.5000
10. The number of
>> mode(num1(:,[1]))
ans =
2.2000
11. Coefficient of variation
>> std(num1(:,[1]))/mean(num1(:,[1]))
ans =
0.3261
12. The moment of origin
>> sum(num1(:,[1]).^2)/length(num1(:,[1])) %2 Moment of origin of order
ans =
9.7103
or
>> mean(num1(:,[1]).^2)
ans =
9.7103
13. Center distance
>> for i = 1:length(num1(:,[1]))
x1(i) = num1(i) - mean(num1(:,[1]))
end
>>
>> mean(x1.^2)
ans =
0.9288
14. Seeking skewness
>> skewness(num(:,[1]))
ans =
0.3339
14. kurtosis
>> kurtosis(num(:,[1]))
ans =
2.9240
15. Covariance and correlation coefficient of the data in the first and second columns
① covariance
First column :
>> cov(num1(:,[1]))
ans =
0.9337
Second column :
>> cov(num1(:,[2]))
ans =
5.3527
Covariance matrix
>> cov(num1(:,[1]),num1(:,[2]))
ans =
0.9337 0.3703
0.3703 5.3527
② The correlation coefficient
>> corr(num1(:,[1]),num1(:,[2]))
ans =
0.1656
边栏推荐
- Genicam gentl standard ver1.5 (2)
- flinkcdc采集oracle,oracle数据库是CDB的
- Tiktok practice ~ pay attention to bloggers
- 【MySQL】多表连接查询
- Establishment of SSH Framework (Part 2)
- 01 overview, application scenarios, Download methods, connection methods and development history of mongodb
- filinCdc 的sql,多表的时候总报这个错,请问下该怎么解决呀
- 有人用cdc同步到mysql发生过死锁吗?
- Simple factory mode
- Go语言学习教程(十四)
猜你喜欢
10: 00 interview, came out at 10:02, the question is really too
Reading notes of top performance version 2 (II) -- CPU monitoring
How to write a software test report? Here comes the third party performance report template
Recommended by Alibaba P8, Fiddler packet capturing tool (I)
Games104 operation 2-colorgrading
领歌leangoo敏捷看板工具新增导出卡片文档和粘贴共享脑图节点功能
公司领导说,个人代码超10个Bug就开除,是什么体验?
Genicam gentl standard ver1.5 (2)
Lingge leangoo agile Kanban tool adds the functions of exporting card documents and pasting shared brain map nodes
政策利好,20多省市开启元宇宙发展规划
随机推荐
Win10 how to delete the large file hiberfil sys
僅用遞歸函數和棧操作逆序一個棧
Flinkcdc collects Oracle, and the Oracle database is CDB's
用一个栈实现另一个栈的排序
Password encryption MD5 and salt treatment
Design a stack with getmin function
10:00面试,10:02就出来了 ,问的实在是太...
flinkcdc采集oracle,oracle数据库是CDB的
测试/开发程序员真的是青春饭吗?世界是公平的,咱们都凭实力说话......
有关函数模板的那些小知识-.-
Recommended by Alibaba P8, Fiddler packet capturing tool (I)
CDC全量抽取mysql数据时,怎么才能加快ChunkSplitter呢?
Analyse complète annuelle du marché chinois de l'audio en 2022
有大佬出现过mysql cdc用 datastream时,出现重复binlog消息的情况吗
A queue of two stacks
【Linux】【Mysql】ERROR 1698 (28000): Access denied for user ‘root‘@‘localhost‘
Annual comprehensive analysis of China's audio market in 2022
由两个栈组成的队列
From meeting a big guy to becoming a big guy, shengteng AI developer creation day brings infinite possibilities to developers
抖音实战~取关博主