MATLAB: Hi I’m new to Matlab and was trying to plot a graph of 2^n but havn’t been able to.

graphplot

.

Best Answer

For example for the range [-5,5]
x = linspace (-5,5,101);
y = 2 .^ x;
plot (x,y);