Calculate power density function of a topographic height map (csv file) containing periodic structures
Show older comments
Hello,
I'm a newbie to matlab facing the following issue: Based on topographic xyz values of a periodic surface pattern exported as a csv file, I need to calculate the power density function of it in order to point out very small differences in surface roughness of these patterns. Can anyone help me with this problem?
Answers (1)
unzip https://www.mathworks.com/matlabcentral/answers/uploaded_files/1416309/Cu-Folie_Paper_8um_AR0.30_2min_230515_8xZoom_1.csv.zip
d=dir('*.csv');
data=readmatrix(d.name);
P=abs(fftshift(fft2(data))).^2;
imagesc(P)
As I feared from the problem description, not much is visible here; we can try exanding small amplitudes to see if there is anything at all or not...
imagesc(abs(log2(P)))
Well, no idea what that might mean; wonder what the original actually looks like (what always should do first)...
imagesc(data)
mesh(data)
Hmmm....looks like some other artifact in the first column is obscuring everything else...that may also be screwing up the FFT...
mesh(data(:,2:end))
data=data(:,2:end);
P=abs(fftshift(fft2(data))).^2;
imagesc(P)
imagesc(log2(P))
2 Comments
dpb
on 21 Jun 2023
So, now explain what it is you're trying to make of these data???
Christian Schäfer
on 22 Jun 2023
Categories
Find more on Time Series Events in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





