radial geometry gradient calculation
2 views (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Elementary Math in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!