surf得到的云图不对

7 次查看(过去 30 天)
弛
2022-12-16
回答: Varun 2023-3-20
% 我上传了4个txt文件,分别对应我的点坐标和我的响应,我想用surf绘制不同点坐标的响应云图。其中,我的响应数据是完全对称的,但是surf得到的结果并不对称
load newX3.txt
load newY3.txt
load newZ3.txt
load newStressZ3.txt
surf(newX3,newY3,newZ3,newStressZ3)

回答(1 个)

Varun
Varun 2023-3-20
Hello!
From the code snippet you just uploaded, I think there’s a syntax error in the way the "surf" function has been called. Calling the surf function with the
surf(newX3,newY3,newZ3,newStressZ3)
syntax passes the variable "newStressz3" as a colour variable, thus changing the way the values get plotted.
To plot the points exactly on the point they are on, try using the hold statement to plot all the variables on the same axes.
surf(newX3)
hold on
surf(newY3)
surf(newZ3)
surf(newStressZ3)
hold off
The result looks something like this:
You may refer to the following documentation for:
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 图形性能 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!