|
[Sponsors] |
August 11, 2016, 03:53 |
autocorrelation in Matlab
|
#1 |
New Member
Alessandro
Join Date: Jul 2016
Posts: 11
Rep Power: 10 |
Dear all,
I am trying to plot the energy spectrum from the autocorrelation function. For this aim I am using the velocity fluctuation of a point of the domain varying through the time. the expression of the autocorrelation from Pope is: <u'(t)u'(t+s)>/<u'>^2, so in case s=0 the autocorrelation is 1. The code that I have written in Matlab is: u_primequad=zeros(n,1); %autocorr=0; for i=1:n-1 u_primequad(i,1)=((u_prime(i)*u_prime(i))); end u_primequad=mean(u_primequad); f=zeros(n,1); autocorr=zeros(n,1); for j=0:n-1 for i=1:n-j autocorr(i,1)=(u_prime(i)*u_prime(i+j)); end autocorr1=mean(autocorr); f(j+1,1)=autocorr1/u_primequad; end Someone can say me if are there some errors? Thank you in advance |
|
July 13, 2019, 04:06 |
|
#3 |
Senior Member
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 8 |
I am doing DNS of pipe flow, and I am wondering how to do autocorrelation using Matlab? Thank you.
|
|
August 20, 2019, 08:03 |
|
#4 |
Senior Member
Arijit Saha
Join Date: Feb 2019
Location: Singapore
Posts: 132
Rep Power: 7 |
||
September 4, 2019, 04:47 |
|
#5 |
Senior Member
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 8 |
||
March 24, 2020, 08:22 |
|
#6 |
New Member
Chia-Chun Chu
Join Date: Mar 2020
Location: Taiwan
Posts: 1
Rep Power: 0 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to start Fluent with Matlab?? | Jay Hu | FLUENT | 8 | November 9, 2022 07:30 |
Export/Import data contour plots with Matlab | meangreen | FLUENT | 11 | October 28, 2020 11:06 |
Very small Matlab job: post-processing OpenFOAM (.CSV) results | RbBb | CFD Freelancers | 1 | July 11, 2016 10:00 |
Linking with Matlab?? | LostinSpace | Phoenics | 0 | March 25, 2013 06:39 |
Live connection Matlab VS OF | levka | OpenFOAM Running, Solving & CFD | 0 | July 10, 2012 05:15 |