Clear Filters
Clear Filters

surf得到的云图不对

9 views (last 30 days)
弛
on 16 Dec 2022
Answered: Varun on 20 Mar 2023
% 我上传了4个txt文件,分别对应我的点坐标和我的响应,我想用surf绘制不同点坐标的响应云图。其中,我的响应数据是完全对称的,但是surf得到的结果并不对称
load newX3.txt
load newY3.txt
load newZ3.txt
load newStressZ3.txt
surf(newX3,newY3,newZ3,newStressZ3)

Answers (1)

Varun
Varun on 20 Mar 2023
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!

Categories

Find more on 图形性能 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!