Plotting Multivariable function poltting

A
adhikari · Aug 10, 2021 · 2.1K views
Question
How can plot f(x,y)= xy/(x^2+y^2) if (x,y) ≠ (0,0) and 0 if (x,y)=(0,0)  
Expert Answer
Profile picture of John Williams
John Williams PhD Expert
Answered Aug 11, 2026
[X,Y] = meshgrid(1:.2:10);                                
Z =(X*Y) / (X^2 + Y^2);
surf(X,Y,Z)

You should avoid including 0 within the grid boundary since it creates a singularity.

Also read about;

https://www.matlabsolutions.com/documentation/matlab-basics/plots.php

100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!