フィルターのクリア

How to create a ezcontour in cylindrical domain?

1 回表示 (過去 30 日間)
Moein
Moein 2015 年 11 月 4 日
コメント済み: Mike Garrity 2015 年 11 月 4 日
hi friends
i have a temperature profile that is a function of radious, r, like this:
syms r
T= -r ^ 2 + 1;
i want to create cylindrical contours in this domain: 0<r<1 ( with symbolic functions) i can do this work by Maple but i want draw it with matlab. the shape that i want to obtain is available in attached file. explain what command i should use or how can i change the coordinate type to cylindrical to recognize the T(r) as a 2D function.
thanks a lot

回答 (1 件)

Mike Garrity
Mike Garrity 2015 年 11 月 4 日
Can't you just add the definition of R in terms of X & Y?
syms x y
r = sqrt(x^2+y^2);
t = -r^2 + 1;
ezcontour(t)
axis equal
  2 件のコメント
Moein
Moein 2015 年 11 月 4 日
編集済み: Moein 2015 年 11 月 4 日
it works but you see that the domain is not 0<r<1. i found the axact answer of my question here:
https://www.youtube.com/watch?v=wSYvIJ0cPgM
but thank you for your answer Mike.
Mike Garrity
Mike Garrity 2015 年 11 月 4 日
I'd forgotten that pol2cart works on syms!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeConversion Between Symbolic and Numeric についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by