Documentos de Académico
Documentos de Profesional
Documentos de Cultura
with 2 columns
[Image: xcj8.png]
[Image: xxsy.png]
[Image: d4p5.png]
4) press ENTER key and numeric result is return in a list
[Image: fhaa.png]
Code:
EXPORT SECTION(mat)
BEGIN
Local t,d,h,y0,a,ix1,iy1,iy;
Local ssy,ry,yy1,ix,ssx,rx;
Local d1,y,i,n,at,ftor,mx1;
t:= revlist(col(mat,1));
d:= revlist(col(mat,2));
h:=MAKEMAT(0,n+1);
h[1]:=0;
d1:=sum(d);
ftor:= 200/(MAX(d1,MAX(t)));
RECT_P();
LINE_P(G0,160,0,160,220,#0000FF);
LINE_P(G0,0,220,320,220,#0000FF);
FOR i FROM 1 TO n DO
h[i+1]:= h[i]+d[i];
IF t[i]≠0 THEN
my1:=iPart(210-ftor*h[i]+0.5);
my2:=iPart(210-ftor*(h[i]+d[i])+0.5);
mx1:=iPart(240-ftor*(t[i]/2)+.5);
mx2:=iPart(mx1+ftor*t[i]+.5);
LINE_P(G0,mx1,my1,mx1,my2,#FF0000);
LINE_P(G0,mx1,my2,mx2,my2,#FF0000);
LINE_P(G0,mx2,my1,mx2,my2,#FF0000);
LINE_P(G0,mx2,my1,mx1,my1,#FF0000);
END;
END;
y0:=h+ d/2;
a:= t .*d;
at:= sum(a);
ssx:=ix/(d1-y);
rx:= √(ix/at);
iy:=sum(iy1);
ssy:= 2*iy/(max(t));
ry:= √(iy/at);
res:= MAKELIST(0,X,1,9);
TEXTOUT_P("dysup@hotmail.com",5,35,0,#0000FF);
FOR i FROM 1 TO 9 DO
TEXTOUT_P(res(i),10,58+i*16);
END;
my1:=iPart(210-y*ftor+0.5);
FOR i FROM 1 TO 11 DO
mx1:= iPart((i-1)*10+190);
mx2:= mx1+6;
LINE_P(mx1,my1,mx2,my1,#00FF00);
END;
TEXTOUT_P("NA",170,my1-5);
REPEAT
WAIT(.35);
WAIT(.35);
return(res);
END;
example:
exist some like this for Hp48, with de name iCalc from Nate Morris
thanks!
churichuro
03-17-2015, 05:24 AM
Francois Lanciault
03-18-2015, 04:55 PM
François
akmon
05-14-2015, 01:13 PM
With new firmware version (7820), the picture of section appears for half a second and it comes back to
main screen showing "Invalid input".
Update. I´ve erased some part of the code, at the end for not flickering "Press Enter". It does not flick,
but the figure and results remain until you press a key.
Code:
EXPORT SECTION(mat)
BEGIN
Local t,d,h,y0,a,ix1,iy1,iy;
Local ssy,ry,yy1,ix,ssx,rx;
Local d1,y,i,n,at,ftor,mx1;
t:= revlist(col(mat,1));
d:= revlist(col(mat,2));
h:=MAKEMAT(0,n+1);
h[1]:=0;
d1:=sum(d);
ftor:= 200/(MAX(d1,MAX(t)));
RECT_P();
LINE_P(G0,160,0,160,220,#0000FF);
LINE_P(G0,0,220,320,220,#0000FF);
FOR i FROM 1 TO n DO
h[i+1]:= h[i]+d[i];
IF t[i]≠0 THEN
my1:=iPart(210-ftor*h[i]+0.5);
my2:=iPart(210-ftor*(h[i]+d[i])+0.5);
mx1:=iPart(240-ftor*(t[i]/2)+.5);
mx2:=iPart(mx1+ftor*t[i]+.5);
LINE_P(G0,mx1,my1,mx1,my2,#FF0000);
LINE_P(G0,mx1,my2,mx2,my2,#FF0000);
LINE_P(G0,mx2,my1,mx2,my2,#FF0000);
LINE_P(G0,mx2,my1,mx1,my1,#FF0000);
END;
END;
y0:=h+ d/2;
a:= t .*d;
at:= sum(a);
yy1:=y0 .- y;
ssx:=ix/(d1-y);
rx:= √(ix/at);
iy:=sum(iy1);
ssy:= 2*iy/(max(t));
ry:= √(iy/at);
res:= MAKELIST(0,X,1,9);
TEXTOUT_P("dysup@hotmail.com",5,35,0,#0000FF);
FOR i FROM 1 TO 9 DO
TEXTOUT_P(res(i),10,58+i*16);
END;
my1:=iPart(210-y*ftor+0.5);
FOR i FROM 1 TO 11 DO
mx1:= iPart((i-1)*10+190);
mx2:= mx1+6;
LINE_P(mx1,my1,mx2,my1,#00FF00);
END;
TEXTOUT_P("NA",170,my1-5);
REPEAT
WAIT(.35);
return(res);
END;