te15
Structural
- Aug 8, 2006
- 7
Hi,
I have a question about plotting 3D matrices. I have data at specific points, as a 3d matrix, and I have the unevenly spaced X,Y,Z data for each point as 3d matrices, respectively. Basically I need to visualize the data over a volume given the XYZ coordinates of each data point.
I looked up thread575-101753.
Please advise whether mesh grid would help in this case(I think it generates evenly spaced coordinate data).
Any suggestions will be most helpful.
Here is a sample of the data:
C
,:,1)=[ 0.4185 0.332 0.2365 0.0635;
0.3255 0.258 0.184 0.0495;
0.2325 0.1845 0.1315 0.035;
0.1395 0.1105 0.079 0.021;
0.0465 0.037 0.0265 0.007;
-0.0465 -0.037 -0.0265 -0.007;
-0.1395 -0.1105 -0.079 -0.021;
-0.2325 -0.1845 -0.1315 -0.035;
-0.3255 -0.258 -0.184 -0.0495;
-0.4185 -0.332 -0.2365 -0.0635];
C
,:,2)= [ 0.837 0.6635 0.4735 0.127;
0.651 0.516 0.368 0.0985;
0.465 0.3685 0.263 0.0705;
0.279 0.221 0.158 0.0425;
0.093 0.0735 0.0525 0.014;
-0.093 -0.0735 -0.0525 -0.014;
-0.279 -0.221 -0.158 -0.0425;
-0.465 -0.3685 -0.263 -0.0705;
-0.651 -0.516 -0.368 -0.0985;
-0.837 -0.6635 -0.4735 -0.127];
C
,:,3)=[1 0.9955 0.71 0.19;
0.976 0.774 0.552 0.148;
0.6975 0.553 0.3945 0.1055;
0.4185 0.332 0.2365 0.0635;
0.1395 0.1105 0.079 0.021;
-0.1395 -0.1105 -0.079 -0.021;
-0.4185 -0.332 -0.2365 -0.0635;
-0.6975 -0.553 -0.3945 -0.1055;
-0.976 -0.774 -0.552 -0.148;
-1 -0.9955 -0.71 -0.19];
C
,:,4)=[1 1 0.9465 0.2535;
1 1 0.7365 0.1975;
1 0.913 0.526 0.141;
0.691 0.548 0.3155 0.0845;
0.2305 0.1825 0.105 0.028;
-0.2305 -0.1825 -0.105 -0.028;
-0.691 -0.548 -0.3155 -0.0845;
-1 -0.913 -0.526 -0.141;
-1 -1 -0.7365 -0.1975;
-1 -1 -0.9465 -0.2535];
C
,:,5)=[1 1 1 0.317;
1 1 0.9205 0.2465;
1 1 0.6575 0.176;
1 1 0.3945 0.1055;
0.9565 0.7585 0.1315 0.035;
-0.9565 -0.7585 -0.1315 -0.035;
-1 -1 -0.3945 -0.1055;
-1 -1 -0.6575 -0.176;
-1 -1 -0.9205 -0.2465;
-1 -1 -1 -0.317];
for i=1:5
X
,:,i)=[0.07043 0.2629 0.47419 0.85911;
0.07043 0.2629 0.47419 0.85911;
0.07043 0.2629 0.47419 0.85911;
0.07043 0.2629 0.47419 0.85911;
0.07043 0.2629 0.47419 0.85911;
0.07043 0.2629 0.47419 0.85911;
0.07043 0.2629 0.47419 0.85911;
0.07043 0.2629 0.47419 0.85911;
0.07043 0.2629 0.47419 0.85911;
0.07043 0.2629 0.47419 0.85911];
Y
,:,i)= [ 0.45 0.45 0.45 0.45;
0.35 0.35 0.35 0.35;
0.25 0.25 0.25 0.25;
0.15 0.15 0.15 0.15;
0.05 0.05 0.05 0.05;
-0.05 -0.05 -0.05 -0.05;
-0.15 -0.15 -0.15 -0.15;
-0.25 -0.25 -0.25 -0.25;
-0.35 -0.35 -0.35 -0.35;
-0.45 -0.45 -0.45 -0.45];
Z
,:,i)=ones(10,4);
end
I have a question about plotting 3D matrices. I have data at specific points, as a 3d matrix, and I have the unevenly spaced X,Y,Z data for each point as 3d matrices, respectively. Basically I need to visualize the data over a volume given the XYZ coordinates of each data point.
I looked up thread575-101753.
Please advise whether mesh grid would help in this case(I think it generates evenly spaced coordinate data).
Any suggestions will be most helpful.
Here is a sample of the data:
C
0.3255 0.258 0.184 0.0495;
0.2325 0.1845 0.1315 0.035;
0.1395 0.1105 0.079 0.021;
0.0465 0.037 0.0265 0.007;
-0.0465 -0.037 -0.0265 -0.007;
-0.1395 -0.1105 -0.079 -0.021;
-0.2325 -0.1845 -0.1315 -0.035;
-0.3255 -0.258 -0.184 -0.0495;
-0.4185 -0.332 -0.2365 -0.0635];
C
0.651 0.516 0.368 0.0985;
0.465 0.3685 0.263 0.0705;
0.279 0.221 0.158 0.0425;
0.093 0.0735 0.0525 0.014;
-0.093 -0.0735 -0.0525 -0.014;
-0.279 -0.221 -0.158 -0.0425;
-0.465 -0.3685 -0.263 -0.0705;
-0.651 -0.516 -0.368 -0.0985;
-0.837 -0.6635 -0.4735 -0.127];
C
0.976 0.774 0.552 0.148;
0.6975 0.553 0.3945 0.1055;
0.4185 0.332 0.2365 0.0635;
0.1395 0.1105 0.079 0.021;
-0.1395 -0.1105 -0.079 -0.021;
-0.4185 -0.332 -0.2365 -0.0635;
-0.6975 -0.553 -0.3945 -0.1055;
-0.976 -0.774 -0.552 -0.148;
-1 -0.9955 -0.71 -0.19];
C
1 1 0.7365 0.1975;
1 0.913 0.526 0.141;
0.691 0.548 0.3155 0.0845;
0.2305 0.1825 0.105 0.028;
-0.2305 -0.1825 -0.105 -0.028;
-0.691 -0.548 -0.3155 -0.0845;
-1 -0.913 -0.526 -0.141;
-1 -1 -0.7365 -0.1975;
-1 -1 -0.9465 -0.2535];
C
1 1 0.9205 0.2465;
1 1 0.6575 0.176;
1 1 0.3945 0.1055;
0.9565 0.7585 0.1315 0.035;
-0.9565 -0.7585 -0.1315 -0.035;
-1 -1 -0.3945 -0.1055;
-1 -1 -0.6575 -0.176;
-1 -1 -0.9205 -0.2465;
-1 -1 -1 -0.317];
for i=1:5
X
0.07043 0.2629 0.47419 0.85911;
0.07043 0.2629 0.47419 0.85911;
0.07043 0.2629 0.47419 0.85911;
0.07043 0.2629 0.47419 0.85911;
0.07043 0.2629 0.47419 0.85911;
0.07043 0.2629 0.47419 0.85911;
0.07043 0.2629 0.47419 0.85911;
0.07043 0.2629 0.47419 0.85911;
0.07043 0.2629 0.47419 0.85911];
Y
0.35 0.35 0.35 0.35;
0.25 0.25 0.25 0.25;
0.15 0.15 0.15 0.15;
0.05 0.05 0.05 0.05;
-0.05 -0.05 -0.05 -0.05;
-0.15 -0.15 -0.15 -0.15;
-0.25 -0.25 -0.25 -0.25;
-0.35 -0.35 -0.35 -0.35;
-0.45 -0.45 -0.45 -0.45];
Z
end