How draw 3d plot with 3 different matix size
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi everybody. I hav a time series,from 1990 up To 2020 yearly ,and i have a 13 different maturity . There is yiels matrix,which its ros equal no of year and column equel no of maturitis. I want to hve a 3d plot that x= year,y= maturity ,z= yields I use surf(x,y,z) but there is error. Pls help me ?
댓글 수: 2
채택된 답변
Ameer Hamza
2020년 5월 15일
Try this
load('germany.mat');
dates = datetime(char(germanyields.Maturity), 'InputFormat', 'yyyy-MM');
surf(gmaturities, dates, gyields)
xlabel('gmaturities');
ylabel('Date');

댓글 수: 3
Ameer Hamza
2020년 5월 15일
편집: Ameer Hamza
2020년 5월 15일
Yes, I rotated it manually. You can try the following code.
load('germany.mat');
ax = axes();
dates = datetime(char(germanyields.Maturity), 'InputFormat', 'yyyy-MM');
surf(gmaturities, dates, gyields)
xlabel('gmaturities');
ylabel('Date');
ax.YDir = 'reverse';
Are you looking for some other modification?
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Sensors and Transducers에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!