MATLAB Answers

0

4D Plot using Columns of Matrix

Asked by Luiz Antonio Martins on 10 Aug 2019
Latest activity Answered by Divya Gaddipati on 13 Aug 2019
I have a 340x5 matrix and I want to plot the 4th and 5th columns as the function of the first 3. Doing a point plot like the stem3 function.
X = A(:,1); %Assume A is the matrix I imported from a file with the size above
Y = A(:,2);
Z = A(:,3);
F = A(:,4);
G = A(:,5);
figure
stem3(X,Y,Z)
But like this que 4th and 5th column are not in the plot. And I wanna do something like F = f(X,Y,Z) and G = g(X,Y,Z). For each row of the A matrix.

  1 Comment

darova
on 10 Aug 2019
F = f(X,Y,Z) and G = g(X,Y,Z)
I don't understand. What does it mean?

Sign in to comment.

Products


Release

R2018b

1 Answer

Answer by Divya Gaddipati on 13 Aug 2019

figure, scatter3(X, Y, Z, 50, F, 'filled');
The scatter3 function can be used, where each point in F is plotted with a different color represented by F and 50 is the marker size.

  0 Comments

Sign in to comment.