Help in visluzation of matrix obtained ?

1 次查看(过去 30 天)
Hi all,
I would like to visualize a matrix as rectangle (or any shape close to rectangle) with different layers (based on num_layers intrdouced in the code) as shown in the attachment,
Anyone help, I never used, or understand how to visualize .. I attached the code...
clear all;
clc;
lines = [0 90 45];
t = [0.1 .1 .1];
num_layers = length(lines);
L = zeros(num_layers,6);
for i=1:num_layers
L(i,:) = [angle t]; % HOW TO REPRESENT OR VISULAZIE THIS L AS RECTANGLE WITH DIFFERENT LAYERS
end
  2 个评论
dpb
dpb 2021-3-25
Look at stacked 3D barplot, maybe?
Mark Sc
Mark Sc 2021-3-25
Thanks for your prompt reply..
Unfortunely, I do not think it will help in that siutation..
All I wanna is to draw shape has different number of layer,
I attach some of the codes , I found, but still do not understand and can not implement what I want
X = [0;1;1;0;0];
Y = [0;0;1;1;0];
Z = [0;0;0;0;0];
figure;
hold on;
plot3(X,Y,Z); % draw a square in the xy plane with z = 0
plot3(X,Y,Z+1); % draw a square in the xy plane with z = 1
set(gca,'View',[-28,35]); % set the azimuth and elevation of the plot
for k=1:length(X)-1
plot3([X(k);X(k)],[Y(k);Y(k)],[0;1]);
end

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by