How to filter data of every coloumn in a dataset

조회 수: 19 (최근 30일)
Lala0099
Lala0099 2019년 3월 8일
댓글: Star Strider 2019년 3월 8일
hey
i have a datasheet of my measurements and i imported it into matlab. each coloumn of the datasheet represent a sataset. (i have 10 coloumns)i would like to filter (high-butterworth) the data of every coloumn of the datasheet .
how can i do that , without separating thr couloumns manually as arrays?
i am a beginner and i appreciate every help

답변 (1개)

Star Strider
Star Strider 2019년 3월 8일
If you are using the filtfilt function (as I would certainly recommend), it will filter all the columns at the same time. (If you want to filter along rows, you will have to transpose your matrix.)
From the documentation for x (link):
‘Input signal, specified as a real-valued or complex-valued vector, matrix, or N-D array. filtfilt operates along the first array dimension of x with size greater than 1.’
  댓글 수: 2
Lala0099
Lala0099 2019년 3월 8일
But how can i use this on my imported file? I am trying to use the data in the "drink00" file. I found these code on the website from your link.
But i dont understand how to let x be equal to the data in the "drink00"file.
des.png
Star Strider
Star Strider 2019년 3월 8일
According to the information in your Workspace browser, ‘drink00’ is a table data type array. You will probably need to use the table2array (link) function to recover the numeric information as an array so you can filter it.
If you have R2018a or later, you might find the lowpass (link) function of interest.
With respect to the error in the image you posted, I have no idea what that could be, since it does not refer to anything else here. However, if you are defining a function, the safest way to work with it is to save it to its own function file and then call it, rather than defining it inside your script. See the documentation on Function Basics (link) for a full discussion.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Matched Filter and Ambiguity Function에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by