x = 2:30;y = 40:60;u = @(x,y) 10*sin(200*x)+0.1*cos(10*y)+(100*x)./y; v = @(x,y) 10*cos(200*x)+0.1*sin(10*y)-100*(x./y);syms x yex = diff(u,x);ey = diff(v,y);Gxy = diff(v,x)+diff(u,y);[X,Y] = meshgrid(x,y);Z = ex(X,Y);figure(1)mesh(X, Y, Z)[X,Y] = meshgrid(x,y);Z = ey(X,Y);figure(2)mesh(X, Y, Z)[X,Y] = meshgrid(x,y);Z = Gxy(X,Y);figure(3)mesh(X, Y, Z)
MATLAB: I need to plot the following functions but I receive this error “Invalid indexing or function definition. When defining a function ensure that the arguments are symbolic variables ….”
errorplot
Best Answer