How to plot several 3D funztions (Z_n=f_n(x,y) with arbitrary intervals for each of them in one coordinate system?
1 view (last 30 days)
I have two functions (Z1=f(x,y) and Z2=f(x,y)) want to plot in one coordinate system but with different intervals interval_Z1=[x1_min, x1_max, y1_min, y1_max] and interval_Z2=[x2_min, x2_max, y2_min, y2_max] using fsurf and hold on commands, but it seems something went wrong and Matlab could not plot them in one coordinates and only plots one of them.
What the problem is?
Totally, how to plot several 3D funztions (Z_n=f_n(x,y) with arbitrary intervals for each of them in one coordinate system?
What about to plot them by only one command in one line, instead of using several hold on command with different commands?
KSSV on 24 Jan 2022
It is plotting both the surfaces, but they are in the same colormap and you are unable to differentiate them. Check this:
syms x y
% give f1 and f4 your functions
ax1 = axes ;
fsurf(f1,[0, 0.00995, 0, 0.02]);
ax2 = axes ;
%%Hide the top axes
ax2.Visible = 'off';
ax2.XTick = ;
ax2.YTick = ;
%%Give each one its own colormap