I want to use between two values while plotting

I need to draw a graph which my ''a'' value must be between 0 and 1 and graph is a.^x
Shortly i want a.^x graphic and ''a'' has to go 0 to 1
I tried something like this but didn't work
a=(0,1);
y=a.^x;
plot(x,y)
i don't know how to set ''a'' 0 to 1. If i have another mistake(s) please help me!

2 Comments

I might have english grammer and vocabulary mistakes sorry already.

Sign in to comment.

 Accepted Answer

a=linspace(0,1,50) ;
x=linspace(0,1,50) ;
[X,Y] = meshgrid(a,x) ;
Z=X.^Y;
surf(X,Y,Z)

2 Comments

I only need 2D sorry for not mentioning it
For what value of x?

Sign in to comment.

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Asked:

on 4 Oct 2022

Commented:

on 4 Oct 2022

Community Treasure Hunt

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

Start Hunting!