Effacer les filtres
Effacer les filtres

radial geometry gradient calculation

2 vues (au cours des 30 derniers jours)
friet
friet le 26 Août 2017
Modifié(e) : friet le 26 Août 2017
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')

Réponses (0)

Catégories

En savoir plus sur Elementary Math dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by