MATLAB:需要做一个四维图(3D +彩色/彩色)彩色、做一个、四维、MATLAB

2023-09-07 17:14:58 作者:安之她梦i

我需要做一个三维表面,颜色会重新present的第四个变量。我知道,冲浪是类似于我所需要的,但这不是这么回事。基本上,我有以下变量:

I need to make a 3D surface where colour will represent the fourth variable. I know "surf" is SIMILAR to what I need, but that's not quite it. Basically, I have the following variables:

T = [1:M]

t = [1:m]

Y = [1:N]

y = [1:n]

A = [1:O]

a = [1:o]

这些应该是这三个笛卡尔corodinate轴。

These should be the three Cartesian corodinate axes.

我也有一个变量S是尺寸mxnxo,并且基本上是振幅,则previous三个变量的函数(即S = F(T,Y,A))。我想这是由颜色psented再$ P $。

I also have a variable S that is of dimensions m x n x o, and is basically the amplitude, a function of the previous three variables (i.e. S = f(t,y,a)). I want this to be represented by colour.

总结一下,我所需要的形式(T,Y,A,S),其中前三个变量是不相等的尺寸的载体和最终变量是一个多维阵列的尺寸由前三个确定的曲线图

So to summarize, I need a graph of the form (t,y,a,S), where the first three variables are vectors of unequal sizes and the final variable is a multidimensional array whose dimensions are determined by the first three.

在此先感谢。

推荐答案

SCATTER3要求 X 以Z 和其他分组参数是一个系列或N×M的矩阵M系列同样大小的NX1向量。

SCATTER3 requires x, y and z and other grouping arguments to be equally-sized Nx1 vectors for a single series or NxM matrices for M series.

您有充分的空间三维数据。为了使同样大小的坐标向量使用 MESHGRID (或