Question

Write a code using MATLAB that displays any type of animation Be creative

Write a code using MATLAB that displays any type of animation

Be creative

0 0
Add a comment Improve this question Transcribed image text
Answer #1

clear; clc; close all

X = -2 : .1 : 2; Y = X;
[x, y] = meshgrid(X, Y);
z = .5 * (x.^2 + y.^2);

h = surf(x,y,z);
axis([-2 2 -2 2 0 20])

xlabel('x'); ylabel('y'); zlabel('z')

for i = 1 : .1 : 5;
    set(h, 'xdata', x, 'ydata', y, 'zdata', i*z)
    drawnow
end   

for az = -37.5 : .5 : 30
    view(az, 30)
    drawnow
end

Add a comment
Know the answer?
Add Answer to:
Write a code using MATLAB that displays any type of animation Be creative
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT