Help in visluzation of matrix obtained ?

조회 수: 3 (최근 30일)
Mark Sc
Mark Sc 2021년 3월 25일
댓글: Mark Sc 2021년 3월 25일
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에서 Data Distribution Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by