plot 2 matrix together
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello, I had 2 matrix as follows
y=[7.1165 9.6022 8.9144 9.2717 6.3400 4.0484 0.3411 -0.6784 -5.7726 -5.4925 -94523 -9.7232 -9.5054 -9.7908 -7.7300 -5.9779 -4.5535 -1.5042 -0.7044 3.2406 8.3029 6.1925 9.1178 9.0904 9.0662];
z=[0 3.1398 6.3739 9.5877 10.145 10.1919 9.0683 10.2254 7.5799 7.7231 5.4721 3.3990 0.9172 -1.3551 -5.2708 -9.7011 -9.4256 -9.3053 -9.3815 -9.8822 -8.1876 -8.7501 -4.5653 -1.9179 -1];
How do i plot this 2 matrix such that it will be like this.

댓글 수: 1
답변 (1개)
KSSV
2020년 11월 13일
Is this what you are looking for?
y=[7.1165 9.6022 8.9144 9.2717 6.3400 4.0484 0.3411 -0.6784 -5.7726 -5.4925 -9.4523 -9.7232 -9.5054 -9.7908 -7.7300 -5.9779 -4.5535 -1.5042 -0.7044 3.2406 8.3029 6.1925 9.1178 9.0904 9.0662];
z=[0 3.1398 6.3739 9.5877 10.145 10.1919 9.0683 10.2254 7.5799 7.7231 5.4721 3.3990 0.9172 -1.3551 -5.2708 -9.7011 -9.4256 -9.3053 -9.3815 -9.8822 -8.1876 -8.7501 -4.5653 -1.9179 -1];
th = linspace(0,2*pi,length(y)) ;
x1 = y.*cos(th) ; y1 = y.*sin(th) ;
x2 = z.*cos(th) ; y2 = z.*sin(th) ;
plot(x1,y1,'o',x2,y2,'*')
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!