please can any one help me i whrite this code to plot a figure but it give me an empty one ?
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
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);
Antworten (2)
Azzi Abdelmalek
am 26 Jul. 2015
0 Stimmen
Your are plotting one point
2 Kommentare
Azzi Abdelmalek
am 26 Jul. 2015
If N=1:100
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);
safi marwa
am 26 Jul. 2015
Star Strider
am 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 Kommentare
safi marwa
am 26 Jul. 2015
Star Strider
am 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);
safi marwa
am 26 Jul. 2015
Diese Frage ist geschlossen.
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!