8. Given the following function: ?= c ∙ sin(2?a)(sqrt(?^2 + ?^2)) In a single Matlab script plot z as a function of x and y when a = 1/2, c = 0.5, − ? ≤ ? ≤ ? and −? ≤ ? ≤ ?. You need to add axis labels and a graph title
`Hey,
Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
clc
clear all
close all
format long
a=1/2;
c=0.5;
x=-pi:0.1:pi;
y=x;
[X,Y]=meshgrid(x,y);
Z=c*sin(2*pi*a)*sqrt(X.^2+Y.^2);
surf(X,Y,Z);
xlabel('X');
ylabel('Y');
zlabel('Z');
title('Plot of Z vs x and y');
Kindly revert for any queries
Thanks.
Get Answers For Free
Most questions answered within 1 hours.