X Y Z coordinates 1 matrix
Show older comments
Hi!
I'm a beginer who uses MATLAB
I want to have only 1 matrix, where each element of the matriz will be a (x,y,z) point. How can i do that?
N=200;
rL=1;
h=0.05;
clx=0.05;
x = linspace(-rL,rL,N);
y = linspace(-rL,rL,N);
[X,Y] = meshgrid(x,y);
Z = h.*randn(N,N);
F = exp(-((X.^2+Y.^2)/(clx^2/2)));
f = 2/sqrt(pi)*rL/N/clx*ifft2(fft2(Z).*fft2(F));
surf(X,Y,f,'FaceColor','interp',...
'EdgeColor','none',...
'FaceLighting','phong')
axis equal off
1 Comment
Torsten
on 14 Mar 2022
So the result should be a N^3 x 3 -matrix ?
Answers (0)
Categories
Find more on Numerical Integration and Differentiation 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!