Filter löschen
Filter löschen

radial geometry gradient calculation

2 Ansichten (letzte 30 Tage)
friet
friet am 26 Aug. 2017
Bearbeitet: friet am 26 Aug. 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')

Antworten (0)

Kategorien

Mehr zu Elementary Math finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by