How to compare between two surface plots in matlab?
14 次查看(过去 30 天)
显示 更早的评论
A and B are two 2D matrices with dimensions (length(X), length(Y)) which are function of X and Y vectors. I plot A and B in a 3D graph using surf as follows:
figure(1)
surf(X,Y,A)
hold on
surf(X,Y,B)
hold on
But, the generated figure doesn't show the difference in values between A and B clearly.
Is there any other way where I can compare between A and B in a 3D plot and show the differences between them clearly?
0 个评论
采纳的回答
Star Strider
2020-11-12
Perhaps:
figure(1)
surf(X,Y,A, 'FaceAlpha',0.5)
hold on
surf(X,Y,B, 'FaceAlpha',0.5)
hold off
.
8 个评论
更多回答(1 个)
Ameer Hamza
2020-11-12
Sometime plotting the difference can be helpful for visualization
figure(1)
surf(X,Y,A-B)
7 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!