フィルターのクリア

radial geometry gradient calculation

2 ビュー (過去 30 日間)
friet
friet 2017 年 8 月 26 日
編集済み: friet 2017 年 8 月 26 日
I have two functions alpha1 and alpha 2. I want to calculate beta1 and beta 2 by solving the equation below.
alpha=-gradient(beta)
for each beta and alpha functions separately. The functions are in radial coordinates. I have tried by best in the code below. However my calculations ar not correct. Any help is appreciated.
Thanks GH
clc
clear all
r1 = 1;
r2 = 3;
R=linspace(r1,r2,100);
for i = 1:100
alpha1(i) = (15*log(R(i)/r2))/log(r1/r2);
end
for i = 1:100
alpha2(i) = 5;
end
figure(1)
plot(R,alpha1,R,alpha2)
xlabel('r');
ylabel('\alpha');
legend('\alpha1','\alpha2')
beta1=-cumtrapz(alpha1,R);
beta2=-cumtrapz(alpha2,R);
figure(2)
plot(R,beta1,R,beta2)
xlabel('r');
ylabel('\beta');
legend('\beta1','\beta2')

回答 (0 件)

カテゴリ

Help Center および File ExchangeElementary Math についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by