
Please i need to plot 3 dimension figure with (x axis is x, y axis is gamma function) and z axis is value of u for this simple attached relation
Show older comments
The constants mu=beta=g=1. The x is vector from -20 to 20.t=2. I need to plot three dimensions Xis vector x, y axis is values of gamma alfa and z is u.

Image added by @Sam Chak
Accepted Answer
More Answers (1)
We don't know your problem, but it should work somehow like this.
What do you mean by "the y-axis is the gamma function" ? Do you want to graph z-values as a curve over the gamma-function in the x-y-plane ?
x = -20:20;
y = 3:0.25:5;
z = y.' .* x;
surf(x,y,z)
8 Comments
Tarek
on 26 Sep 2025
Tarek
on 26 Sep 2025
Hi @Tarek
Since coefficients mu^2/(beta=gamma) =1 and (mu/beta)=1 are insignificant to you, could you follow up from here and type out the second equation for u? This will help ensure that your equations are expressed correctly.
Make sure that the equations are correct before plotting the the bivariate function.
%% Step 1: Declare symbols
syms alpha xi x t
%% Step 2: Type out Equation 1
eq1 = xi == (x + 6/(25*gamma(alpha + 1))*t^alpha)
Although you defined the range for α from
to 3, it is important to note that the Gamma function in MATLAB also accepts negative real and decimal numbers. Be careful!
gamma(-3)
gamma(-1.2345)
Tarek
on 26 Sep 2025
Star Strider
on 26 Sep 2025
@Tarek --
The image is not showing up for me.
This is what I get --

Plese use the 'Image (Ctrl+Alt+Z)' icon in the top toolbar (leftmost icon in the INSERT section).
.
Sam Chak
on 26 Sep 2025
@Tarek, Could you verify on your end why the domain of Gamma function,
starts from +1 to 10 when you defined the range for alpha, α is from -3 to 3? This is important to clarify!
By the way, since you replied using your mobile device, can you access MATLAB Mobile to code the equation? Additionally, all images you uploaded from your mobile device can only be viewed in mobile mode but not in desktop mode.
T K
on 26 Sep 2025

T K
on 26 Sep 2025
The domain of Gamma function starts from +1 to 10 because the (gamma zero) =infinity.The coefficient
(mu^2/(beta*ga)) =1, (mu/beta)=1and t=1.
X-axis is x starting from -20 to +20. Y -axis is is alfa starting from 0 to 10. Z-axis is u.
I need to plot surf(x,alfa,u)
Categories
Find more on Image Arithmetic 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!
