mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 16:29:34 +00:00
lqi to pdr map and model
This commit is contained in:
parent
8a717ce8d2
commit
64564003c4
@ -5,9 +5,27 @@ file fin=input("./1000pkt-64len.csv");
|
|||||||
real[][] A=dimension(csv(fin),0,2);
|
real[][] A=dimension(csv(fin),0,2);
|
||||||
real[][] pdr=transpose(A);
|
real[][] pdr=transpose(A);
|
||||||
|
|
||||||
draw(graph(pdr[1],pdr[0]));
|
int[] lqi = sequence(100);
|
||||||
|
|
||||||
ylimits(0,1000);
|
int f (int lqi)
|
||||||
|
{
|
||||||
|
if(lqi < 6) {
|
||||||
|
return 0;
|
||||||
|
} else if(lqi < 11) {
|
||||||
|
return (lqi-6)*18;
|
||||||
|
} else if (lqi < 30) {
|
||||||
|
return (int)((real)(lqi-11) * 0.5 + 90);
|
||||||
|
} else {
|
||||||
|
return 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int[] f_lqi = map(f,lqi);
|
||||||
|
|
||||||
|
draw(graph(pdr[1],pdr[0]/10));
|
||||||
|
draw(graph(lqi,f_lqi), red);
|
||||||
|
|
||||||
|
ylimits(0,100);
|
||||||
xlimits(0,100);
|
xlimits(0,100);
|
||||||
xaxis("\rm Output Current (A)",BottomTop,LeftTicks("$%.1f$",10,begin=false,end=false,extend=true,pTick=dotted));
|
xaxis("\rm Output Current (A)",BottomTop,LeftTicks("$%.1f$",10,begin=false,end=false,extend=true,pTick=dotted));
|
||||||
yaxis("\rm Output Power (W)",LeftRight,RightTicks("$%#.1f$",8,begin=false,end=false,extend=true,pTick=dotted, ptick=dotted));
|
yaxis("\rm Output Power (W)",LeftRight,RightTicks("$%#.1f$",8,begin=false,end=false,extend=true,pTick=dotted, ptick=dotted));
|
||||||
|
Loading…
Reference in New Issue
Block a user