×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Random perturbed uniform mesh in Matlab....

Random perturbed uniform mesh in Matlab....

Random perturbed uniform mesh in Matlab....

(OP)
Hey guys and gals,
I am trying to generate a random perturbed mesh in Matlab and I an having a bit of problems. Does anyone know any good references that I can use to get an Algorithm or even some sample Matlab code.Or in general any suggestions at all will be welcomed.
Can't wait to see what you'll come up with..

Tony

RE: Random perturbed uniform mesh in Matlab....

Do you mean a simple rectangular grid whos nodes are shifted in some direction by small random amounts?

A little more information would be useful

M

--
Dr Michael F Platten

RE: Random perturbed uniform mesh in Matlab....

(OP)
yes Mickey..you hit the nail on the head.Each small quadrilateral therefore becomes distorted..
Tony

RE: Random perturbed uniform mesh in Matlab....

Try this

CODE

% define the undeformed mesh
x = [1:10];
y = [1:20];
[X,Y] = meshgrid(x,y);
% define some constant z values (for 3-D plotting)
Z = zeros(length(y),length(x));
% plot the undeformed mesh
figure;
subplot(1,2,1);
mesh(X,Y,Z);
axis([0 11 0 21 -1 1]);
view([0,0,1]);
title('Unperturbed Mesh');
% define the random perturbations
X_rand = (rand(length(y),length(x))-0.5)./3;
Y_rand = (rand(length(y),length(x))-0.5)./3;
% perturb the mesh
X_p = X+X_rand;
Y_p = Y+Y_rand;
% plot the deformed mesh
subplot(1,2,2);
mesh(X_p,Y_p,Z);
axis([0 11 0 21 -1 1]);
view([0,0,1]);
title('Perturbed Mesh');
M

--
Dr Michael F Platten

RE: Random perturbed uniform mesh in Matlab....

(OP)
I must say Mickey.....you are good at what you do ...

Thanks a million

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources