GithubHelp home page GithubHelp logo

blog's People

Stargazers

 avatar

Watchers

 avatar

blog's Issues

导入excel数据到matlab中; import excel data to MatLab

读写excel文件的函数xlsfinfo检查文件是否包含excel表格;xlread读写excel文件;xlswrite写excel文件。xlsread的调用格式为:

1.    num=xlsread('filename')从excel文件filename的第一个工作页中读取所有的数据到double型数据num中。它忽略头行、头列、尾行、和尾列的所有单元为文本的行列,其他单元中的文本全部读取为NaN。
2.    num=xlsread('filename',-1)手动框选要读取的数据块,返回到矩阵num中。
3.    num=xlsread('filename',sheet)读filename中指定页的数据到矩阵中。
4.    num=xlsread('filename','range')读filename中第一页的指定区域的数据到矩阵中。例如num=xlsread('a1.xls','A2:G2')
5.    num=xlsrad('filename',sheet,'range')读filename中指定页、指定区域的数据到矩阵中。
6.    num=xlsread('filename',sheet,'range','basic')以基本输入模式,读filename中指定页的数据到矩阵中,参数range被忽    略,sheet必须为带引号的字符串且区分字母大小写。这种模式限制了数据输入的能力,不将excel当作一个COM服务器。
7.    [num,txt]=xlsread('filename',.......)读filename中的数据,返回数据double型数据到num中,文本数据到字符串单元数组txt中。txt中对应的数值数据 的位置为空字符串。
8.   [num,txt,raw]=xlsread('filename',.....)读filename中的数据,并返回数值数据到double型数组num中,非数值的文本到字符串单元数组txt中,未处理的单元数据到字符串单元数组raw中。raw中包含数值数据和文本数据。

python 画图时,如何隐藏spine(背脊),让图更优美

  • [隐藏画图四周的线 ]
def spines_invisible(ax_obj):

    ax_obj.spines['right'].set_visible(False)
    ax_obj.spines['top'].set_visible(False)
    ax_obj.spines['bottom'].set_visible(False)
    plt.xticks([])
  • [ subplot的时候,返回ax这个object. 有时间研究下这个ax,是什么?]
# Creates two subplots and unpacks the output array immediately
f, ax_list = plt.subplots(10, 1, sharey=True, sharex=True)
# Remove the spine and trick from the axis
[spines_invisible(ax_obj) for ax_obj in ax_list]

matlab中系统识别函数 ARMA 的使用

转载于 http://www.ilovematlab.cn/thread-558129-1-1.html 作者: 科西嘉特卫
目前正在从事陀螺仪数据处理方面的研究工作,对数据预处理后,需要对陀螺仪随机漂移数据进行建模,一般选用AR或ARMA时间序列模型,因此需进行模型参数估计。
选用AR模型时,使用aryule(x,p)函数,输入x为模型输入数据,p为模型阶数,函数返回模型参数;
选用ARMA模型时,使用armax函数,该函数实际为armax模型的参数估计,原型为sys = armax(data,[na nb nc nk]),可以看出有4个阶次输入参数,但在其帮助文档有这么一句话:“If data is a time series that has no input channels and one output channel, then armax calculates an ARMA model for the time series : A(q)y(t)=C(q)e(t)
In this case, orders = [na nc]”。所以,当只有两个阶次输入时,就可以进行ARMA模型的参数估计。
实例如下:(因数据较大,仅展示运行结果)
AR模型:

ssy=aryule(GyroX,2)
ssy =
1.0000 -0.9545 0.0455
ARMA模型:
sy=armax(GyroX,[2,1])
sy =
Discrete-time ARMA model: A(z)y(t) = C(z)e(t)
A(z) = 1 - 1.412 z^-1 + 0.4651 z^-2
C(z) = 1 - 0.4473 z^-1
Sample time: 1 seconds
Parameterization:
Polynomial orders: na=2 nc=1
Number of free coefficients: 3
Use "polydata", "getpvec", "getcov" for parameters and their uncertainties.
Status:
Estimated using ARMAX on time domain data.
Fit to estimation data: 59.34% (prediction focus)
FPE: 0.0447, MSE: 0.04468

mad(median absolute deviation)/(mean absolute deviation)

what is mad(median absolute deviation)/(mean absolute deviation)

in statistic we have many ways to estimate standard deviation. median absolute deviation or mean absolute deviation is one kind of them.

mad(median absolute deviation) = median(|x_i-median(x)|)

mean absolute deviation = mean(abs(x_i-mean(x)))

get details in R function for median absolute deviation

在pandas中如何有条件的选择行

在使用dataframe处理数据的时候碰到了按照条件选取行的问题,单个条件时可以使用:

df[df['one'] > 5]

如果多个条件的话需要这么写:

import numpy as np

df[np.logical_and(df['one']> 5,df['two']>5)]

也可以这么写

df[(df['one']> 5) & (df['two']>5)]


作者:u100k
来源:CSDN
原文:https://blog.csdn.net/u100k/article/details/51394486
版权声明:本文为博主原创文章,转载请附上博文链接!

ca2019 第五次练习课的特征值分解

在做练习的时候,发现了一些函数的用法和数学原理特此记录,完整的代码

根据文档numpy.eig,会返回w,v两个矩阵,w是eigenvalue, v是eigenvector, 值得注意的是,w和v没有根据大小排序,不符合pca的要求。

因此我们使用 numpy.argsort ,他帮助我们返回排序下标index,再次在原数组中索引这些下标就能得到排序后的数组。

最后注意的是,排序结果是从小到大,pca希望的是从大到小,所有最后还有一个,如何数组颠倒顺序

how to install R package behind the compamy proxy

when I try to install this package in Rstudio(1.1.463) on window7 computer, it occur two big problems.

  1. Error in curl::curl_fetch_memory(url, handle = h) : Could not resolve host: api.github.com

  2. BinSeg_MultiDim.h:21:26: fatal error: gsl/gsl_math.h: No such file or directory

After one day struggle I have solved all problems.

1. solving the first one (proxy)

About question one this is because you use company's computer and all access to Internet is through proxy. So your access to github is blocked and need use install_local('path') to install this package locally.

  • download the github file as zip form

  • use install_local('path') . Here path is the path where you put your zip file

  • at the same time you are highly probable required to install Rtools, just do it

2. the second one (missing gsl/gsl_math.h )

you miss a gsl library. This is the GNU Scientific Library. To solve this you need to download Gsl for Windows, here is the link gsl library

  • install this gsl on your computer

  • find C:\Users\yourname\GnuWin32\include\gsl and copy the whole file of gsl and put it to your R path C:\Users\yourname\Documents\R\R-3.5.3\include

  • Fertig! 👍

2019年夏季学期要下载的课程资料

  1. CA
  2. Java advanced
  3. SQL data analysis
  4. distributed system
  5. MI2 & ML2
  6. Introduction to Engineering Data Analytics with R
  7. [SoSe 2019] Deep Neural Networks
  8. Mustererkennung und technische Diagnose 2019
  9. TKN WS17/18 VL Rechnernetze und Verteilte Systeme (L 361)
  10. [SoSe 2019] Machine Learning in the Sciences

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.