New to matlab problem plotting
2 ビュー (過去 30 日間)
古いコメントを表示
Hello guys! I'm new to matlab and i have to make a 3D plot. I have managed to do that for a 2D graph (like a cross-sectional view) and tried searching for hours on how can i make it a 3D shape but without any luck. I have attached the code i wrote for the 2D version as well as pics of how it looks like and how it's supposed to look like. I hope you can give me some insight on how to do it.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/481488/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/481488/image.png)
t=linspace(0,2*pi);
r=1.1;
xc=-0.1;
yc=0.05;
x=r*cos(t)+xc;
y=r*sin(t)+yc;
plot(x,y)
axis equal
zeta=x+i*y;
z=zeta+1./zeta; hold on; plot(-1,0,'rs',1,0,'gd'); plot (real(z),imag(z))
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/481493/image.png)
0 件のコメント
採用された回答
Star Strider
2021 年 1 月 7 日
The second image looks as though it was copied from my Answer in that post!
7 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!