how can i make graph i n which first i want function f(x,y) from user by input command but then i HAVE TO PLOT THAT FUNCTION f(x,y) 3D plot.
Show older comments
how can i make graph i n which first i want function f(x,y) from user by input command but then i HAVE TO PLOT THAT FUNCTION f(x,y) 3D plot. I first convert the function in to inline function using inlne command then i don,t know how to plot 3d graph. because one error always showing conversion from inline to double is not possible
clear
clc
syms x y
a=input('Enter function f(x,y) = ');
b=inline(a);
x=[-2:0.1:2];
y=[-2:0.1:2];
[X,Y]=meshgrid(x,y)
x=X;
y=Y;
z=a;
mesh(z)
3 Comments
the cyclist
on 5 Apr 2024
It sounds like you have already written some code, but it is not working the way you intend. Can you post that code? You can use the paperclip icon in the INSERT section of the tool bar to upload a file, or just paste code.
Torsten
on 5 Apr 2024
Does this help ?
SYED
on 5 Apr 2024
Accepted Answer
More Answers (0)
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!