필터 지우기
필터 지우기

surf得到的云图不对

조회 수: 9 (최근 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!