I read through the forums to help answer my questions before submitting a question. Eventhough there were similar questions asked, I do not believe that my question was answered.
I have a 200x200x600 matrix that needs to be plotted. The matrix contains potential data in a grid cube, The plot is basically a 3D x,y,z grid that contains potential data at those each (x,y,z) point. My question is how would one.
Surf requires (X,Y,Z) co-ordinates and Patch does not seem to be fitting. Any help appreciated!

댓글 수: 4

Adam Danz
Adam Danz 2020년 6월 18일
편집: Adam Danz 2020년 6월 18일
If the first two dimensions also specify the x & y values (ie, x = 1:200, y = 1:200), then each (x,y) coordinate contains 600 values that will all be plotted on top of each other. That doesn't seem useful. Perhaps the details will clear things up.
Hans123
Hans123 2020년 6월 18일
Hi Adam, thank you for your reply - I am unable to understand what you are saying. The co-ordinates basically are the vertices of a cube and each vertex has an assigned potential value. This potential value is saved in the 3D matrix and I am trying to plot it to interept the results.
Adam Danz
Adam Danz 2020년 6월 18일
I see what you mean. So, if I understand correctly, you want to plot a solid object. How will you see beyond its surface? Since it's a rectangle, how will you see point (50,50,50) for example?
Here's a way to plot a 3D scatter plot but I don't think this is what you're looking for.
data = reshape(1:175, 5,5,7); % Fake data, 5x5x7
[X,Y,Z] = meshgrid(1:size(data,1), 1:size(data,2),1:size(data,3));
scatter3(X(:),Y(:),Z(:), 80, data(:),'filled')
Kelly Kearney
Kelly Kearney 2020년 6월 18일
The slice function may also be of interest

댓글을 달려면 로그인하십시오.

 채택된 답변

Walter Roberson
Walter Roberson 2020년 6월 18일

4 개 추천

volumeViewer()
slice()
isosurface()
Also, vol3d v2 from the File Exchange.

추가 답변 (0개)

카테고리

질문:

2020년 6월 18일

답변:

2020년 6월 18일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by