Plotting 3D of Bessel equation using Matlab

Please help with this code, is giving me negative at x.
The code is attached below
e = 137.46 ;
g = 6.66;
t = 13.85;
x = 0 : 0.001 : 0.002;
y = 0 : 0.002 : 0.004;
C = 800;
[X,Y] = meshgrid(x,y);
a = -(y*g)/2;
n = ((y.*sqrt(g.^2)-4.*t)/2);
M = C.*x.^a.*besseli(e,x);
mesh (M, X, Y);
xx = -2 : 0.25 : 3;
yy = -2 : 0.25 : 3;
zz = C.*xx.^-0.0067.*besseli(e,xx);
densityplot(yy, zz, [4 4]);
xlabel('intimal/media'); ylabel('y'); zlabel('z');
Thank you

Answers (2)

Use this custom function
67.png

6 Comments

this exactly what is giving me. but the value of x10^-209 is the problem am having, is there a way to reduce the x to something smaller. i have another plot that is not in this form but same code is apply.
the is attached below
e = 399.74 ;
g = 5.41;
t = 7.32;
x = 0 : 0.003 : 0.005;
y = 0 : 0.001 : 0.002;
C = 800;
[X,Y] = meshgrid(x,y);
a = -(y*g)/2;
n = ((y.*sqrt(g.^2)-4.*t)/2);
M = C.*x.^-0.003.*besseli(e,x);
mesh (M, X, Y);
xx = -3 : 0.25 : 3;
yy = -3 : 0.25 : 3;
zz = C.*xx.^-0.005.*besseli(e,xx);
densityplot(yy, zz, [4 4]);
xlabel('thrombus'); ylabel('y'); zlabel('z');
Another plot is: 3D mesh
mesh (M, X, Y);
Is this X, as you are mentioning?
>> X
X =
0 0.0010 0.0020
0 0.0010 0.0020
0 0.0010 0.0020
>>
i am plotting M against X against Y
his exactly what is giving me. but the value of x10^-209 is the problem am having, is there a way to reduce the x to something smaller.
Change the these values, for your desire results, ensure that both must have same length
xx = -2 : 1 : 10;
yy = -2 : 1 : 10;

Sign in to comment.

hello boss
how are u doing
Thanks for the other time. please i still need ur help concern those codes. The dis xx and yy did not work for all, have change it am having different x-axese.
take a look @ these codes
T1 = 0.689;
T2 = 0.0107;
T0 = 1/T1 + 1/T2;
Tg = 1/T1*T2;
C = 800;
e = 59.60;
x = 0 : 0.003 : 0.005;
y = 0 : 0.001 : 0.002;
[X,Y] = meshgrid(x,y);
a = -(y*Tg)/2;
n = ((y.*sqrt(Tg.^2)-4.*T0)/2);
M = C.*x.^-7.7640e06.*besseli(e,x);
mesh (M, X, Y);
xx = 0: 2 :6;
yy = 0 : 2 :6;
zz = C.*xx.^-1.5530e05.*besseli(e,xx);
densityplot(yy, zz, [4 4]);
xlabel('calcification'); ylabel('y'); zlabel('z');
T1 = 1.797;
T2 = 0.0493;
T0 = 1/T1 + 1/T2;
Tg = 1/T1*T2;
C = 800;
e = 103.14;
x = 0 : 0.003 : 0.005;
y = 0 : 0.001 : 0.002;
[X,Y] = meshgrid(x,y);
a = -(y*Tg)/2;
n = ((y.*sqrt(Tg.^2)-4.*T0)/2);
M = C.*x.^-2.7435e05.*besseli(e,x);
mesh (M, X, Y);
xx = 0: 2 : 6;
yy = 0 : 2 :6;
zz = C.*xx.^-1.3717e05.*besseli(e,xx);
densityplot(yy, zz, [4 4]);
xlabel('fibrous'); ylabel('y'); zlabel('z');
T1 =2.006;
T2 = 0.0749;
T0 = 1/T1 + 1/T2;
Tg = 1/T1*T2;
C = 800;
e = 137.46;
x = 0 : 0.003 : 0.005;
y = 0 : 0.001 : 0.002;
[X,Y] = meshgrid(x,y);
a = -(y*Tg)/2;
n = ((y.*sqrt(Tg.^2)-4.*T0)/2);
M = C.*x.^-3.7338e-05.*besseli(e,x);
mesh (M, X, Y);
xx = 0: 2 : 6;
yy = 0: 2 : 6;
zz = C.*xx.^-1.8669e-05.*besseli(e,xx);
densityplot(yy, zz, [4 4]);
xlabel('intimal/media'); ylabel('y'); zlabel('z');
Thanks in anticipation

Categories

Tags

Asked:

on 26 Aug 2019

Answered:

on 29 Aug 2019

Community Treasure Hunt

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

Start Hunting!