How can I surrogate data in MATLAB?

조회 수: 4 (최근 30일)
Mir Sahand
Mir Sahand 2024년 12월 1일
댓글: Mir Sahand 2024년 12월 3일
Hello all
I want to surrogate my data (500x1 excel file) but I have no idea how to do that and since I have little time left for that I need to do that fast and so I do not have enough time to go through fundamentals of surrogating data (I am using R2022b version).
Can anyone provide me a simple code for surrogating data? Thanks in advance!

채택된 답변

Sameer
Sameer 2024년 12월 2일
Surrogating data typically involves generating a new dataset that preserves certain properties of the original dataset, such as its mean and variance, but randomizes other aspects to test statistical hypotheses.
Here's a simple way to surrogate your data by shuffling it. This is one of the simplest surrogate data methods:
% Load your data from the Excel file
data = xlsread('your_file.xlsx');
% Surrogate the data by shuffling
surrogateData = data(randperm(length(data)));
xlswrite('surrogate_data.xlsx', surrogateData);
Hope this helps!
  댓글 수: 1
Mir Sahand
Mir Sahand 2024년 12월 3일
Thanks a lot @Sameer
your answer really helped me out!
can you please mention one or two other methods for surrogating data or maybe their code source?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spline Postprocessing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by