フィルターのクリア

How to store data

2 ビュー (過去 30 日間)
Griffin Polglaze
Griffin Polglaze 2020 年 7 月 12 日
回答済み: madhan ravi 2020 年 7 月 12 日
I am trying to store data for variables x, y, r and theta but am not sure how to do it. Any help would be greatly appreciated
angle = pi;
D = 0.05;
while angle < 2*pi
angle = angle + pi/100;
x = (D/2)*cos(angle);
y = (D/2)*sin(angle);
r = (x^2+y^2)^0.5;
theta = atan(y/x);
end

採用された回答

madhan ravi
madhan ravi 2020 年 7 月 12 日
dp = pi/100;
Angle = pi : dp : (2*pi - dp);
D = 0.05;
x = (D/2) * cos(Angle);
y = (D/2) * sin(Angle);
r = sqrt(x .^ 2 + y .^ 2);
theta = atan(y ./ x);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by