Plotting 3D cube as 2D layers

Hello,
I have a mathlab code for 3D data which were generated using "For" loops with multiple iterations. To be specific, the following "(function)" s are from equations of finite difference analysis.
ic = 0
for i = 1:100
for x = 1:N
for y = 1:N
for z = 1:N
V1(x,y,z) = (function)
V2(x,y,z) = (function)
V3(x,y,z) = (function)
end
end
ic = ic + 1
if ic>10
ic =0
end
end
"(function)" example: V2(x+1,N-1,k-1)+V1(x-1,N-2,k+1)...so on
I want to plot V1(x,z) 2D layer with a fixed value of "y". Example V1(:,1,:). I could not find a way to do it.
Also I would like to know what are the other ways i can generate different plots to analyze the V1,V2 and V3
Thank you !!!!!!!

5 件のコメント

KSSV
KSSV 2020 年 6 月 5 日
Provide the function.....w.r.t what you want plot?
The Sanchi
The Sanchi 2020 年 6 月 5 日
編集済み: The Sanchi 2020 年 6 月 5 日
its a plot for finite difference analysis which analyze each points in a 3D mesh. I want a plot of those dots. here is an example of how the function looks like
for x = 1: N
for y = 1:N
for z = 1:N
V1(x,y,z) = V2(x,y+1,z) - V2(x,y-1,k) - V3(x,y,z+1) + V3(x,y,z-1)
end
end
end
I have trouble extrcting data of V1(x), V1(y) and V1(z) seperately from the loop.
I want a surf plot something as surf or mesh plot of V1
Thank you !!!!!
darova
darova 2020 年 6 月 13 日
DO you ahve original equations? Can you show an expected result? Simple sketch or something?
Rafael Hernandez-Walls
Rafael Hernandez-Walls 2020 年 6 月 14 日
The Sanchi
The Sanchi 2020 年 11 月 29 日
thank you darova & Rafael, my project was stopped for a while.

サインインしてコメントする。

回答 (0 件)

カテゴリ

質問済み:

2020 年 6 月 5 日

コメント済み:

2020 年 11 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by