Info

This question is closed. Reopen it to edit or answer.

please can any one help me i whrite this code to plot a figure but it give me an empty one ?

1 view (last 30 days)
ti=40;
tb=320;
alpha=ti/tb;
k=256 ;
N=100;
peff= k/(N*(1-(1/N))^(1-k)) - k + (N*(1-(1/N)))*(alpha-1) ;
plot(peff);

Answers (2)

Azzi Abdelmalek
Azzi Abdelmalek on 26 Jul 2015
Your are plotting one point

Star Strider
Star Strider on 26 Jul 2015
The plot is not empty. Changing the plot call in your code to:
plot(peff, 'bp')
will demonstrate this. You need to define your variables as vectors. Since I don’t know what you want to do, this is the closest I can come to a solution.
  3 Comments
Star Strider
Star Strider on 26 Jul 2015
It’sz not a very interesting plot, but this seems to work:
ti=40;
tb=320;
alpha=ti/tb;
k=256 ;
N=1:100;
peff= k./(N.*(1-(1./N)).^(1-k)) - k + (N.*(1-(1./N))).*(alpha-1) ;
plot(peff);

Tags

No tags entered yet.

Products

Community Treasure Hunt

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

Start Hunting!