×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Plotting 3d volume data in Matlab

Plotting 3d volume data in Matlab

Plotting 3d volume data in Matlab

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources