3D Plot of a Matrix with only Char data type
조회 수: 1 (최근 30일)
이전 댓글 표시
- I have a matrix which with Char data type i.e All data are in text format.
- My goal is to make an x-y-z plot that will rep these data in an image format
- Can this be done in Matlab
- Data sample below
x= 'USA', 'Germany', 'South Africa', 'China', 'Mexico', 'Australia'
y = 'America', 'Europe', 'Africa', 'Asia', 'South America', 'Australia'
z= 'First world', 'Tech', 'Developing', 'Business', 'Work force', 'Medicine'
댓글 수: 3
the cyclist
2021년 10월 5일
@Cutie, perhaps take a look at the MATLAB Gallery, and think about which type of plot might be able to translate your type of data into a visualization.
답변 (1개)
Chunru
2021년 10월 5일
x= {'USA', 'Germany', 'South Africa', 'China', 'Mexico', 'Australia'};
y = {'America', 'Europe', 'Africa', 'Asia', 'South America', 'Australia'};
z= {'First world', 'Tech', 'Developing', 'Business', 'Work force', 'Medicine'};
% convert string to categorical (numerical)
xc = categorical(x);
yc = categorical(y);
zc = categorical(z);
% plot the result, eg. stem3
figure
stem3(xc, yc, zc)
참고 항목
카테고리
Help Center 및 File Exchange에서 Labels and Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!