Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Use Matlab to solve the question: 5. (a) The initial temperature distribution ov

ID: 3281648 • Letter: U

Question

Use Matlab to solve the question:

5. (a) The initial temperature distribution over a rectangular plate is given by T(x,y) = 80y2e-x2-0.3y2. Plot the 3-D temperature distribution over the domain -2.2 Sx 32.2 and -6 ^y 36 and show 2-D and 3-D contour plots of temperature. (10 marks) (b) A fractal picture can be drawn by plotting the points (x y) generated by the following equation. Xp+1 = yk (1 + sin(0.7%))-1.2 1Xpl and yk+1-0.21-Xp. Starting with xo-yo = 0, write a program to draw a picture by plotting individual points but do not join them. (10 marks) (c) The arrangement of seeds in a sunflower head follows a fixed mathematical pattern. The nth seed is at position r=n/2 with angular coordinate dn/180 radians, where d is the constant angle of divergence (in degrees) between any two successive seeds. For a perfect sunflower head, d-137.51°. Write a program to plot the seeds using a°(small circle) for each seed and simulate a sunflower head. Try changing d to 137.450 and 137.920 and show the corresponding plots. (10 marks)

Explanation / Answer

5 (a)

[X,Y] = meshgrid(linspace(-2.2,2.2,100),linspace(-6,6,100));
Txy = 80*(Y.^2).*exp((-X.^2)-(0.3*(Y.^2)));
plot3(X,Y,Txy); % 3D temperature distribution
xlabel('X'); ylabel('Y');zlabel('T(x,y)');
figure; contour(X,Y,Txy); % 2D contour plot
figure; contour3(X,Y,Txy); % 3D contour plot

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at drjack9650@gmail.com
Chat Now And Get Quote