|
| ̤²ò·è |
| ²ò·è |
| Ää»ß |
| ºï½üÍ×ÀÁ |
|
2014/10/6(Mon) 17:19:38|NO.65457
ϢΩÊýÄø¼°¤ò²ò¤¯¥×¥í¥°¥é¥à¤òºî¤Ã¤Æ¤¤¤Þ¤¹¡£
£Ã¤Ç½ñ¤¤¤Æ¤¤¤Þ¤·¤¿¤¬android²½¤Ç¤¤ë¤Èʹ¤¤¤¿¤Î¤Ç£È£Ó£Ð¤Ë°Ü¿¢¤·¤è¤¦¤È»×¤¤¤Þ¤·¤¿¡£
¤³¤Î¥×¥í¥°¥é¥à¤ò¼Â¹Ô¤¹¤ë¤È
0¤Ç½ü»»¤·¤Þ¤·¤¿¡¡¤È¤¤¤¦¥¨¥é¡¼¤¬½Ð¤Æ¤·¤Þ¤¤¤Þ¤¹¡£
Ëܤä¥Í¥Ã¥È¤ÇÄ´¤Ù¤Þ¤·¤¿¤¬²ò·èºö¤¬¤è¤¯¤ï¤«¤ê¤Þ¤»¤ó¡£
Ĺʸ¤¹¤¤¤Þ¤»¤ó¡£
x1=0:y1=0 ; ²èÌ̺¸¾å¤ÎºÂɸ
x2=320:y2=480 ; ²èÌ̱¦²¼¤ÎºÂɸ
screen 0,x2,y2 ;¥¦¥£¥ó¥É¥¦É½¼¨
cls 4;²èÌ̤ò¹õ¤ÇÅɤë
dim a;¡Á24 ÊÑ¿ô¤Î½é´ü²½
dim b
dim c
dim d
dim e
dim f
dim g
dim h
dim i
dim j
dim k
dim l
dim m
dim x
dim y
dim z
dim p
dim q
dim n
color 255,0,0 :font "MS ¥´¥·¥Ã¥¯",80,1;¡Á27¡¡²¼¤Î³ç¸Ì¤Îɽ¼¨
pos 180,330
mes"{"
color 255,0,0 :font "MS ¥´¥·¥Ã¥¯",15,1;¡Á30¡¡¾å¤Î¼°¤Îɽ¼¨
pos 100,130
mes" X+ Y= "
pos 75,130;¡Á34¡¡¾å¤Î¼°¤Îa¤Î¼èÆÀ
objsize 30,15
a=""
input a
pos 135,130;¡Á38¡¡¾å¤Î¼°¤Îb¤Î¼èÆÀ
objsize 30,15
b=""
input b
pos 190,130;¡Á42 ¾å¤Î¼°¤Îc¤Î¼èÆÀ
objsize 30,15
c=""
input c
color 255,0,0 :font "MS ¥´¥·¥Ã¥¯",15,1;¡Á45 ²¼¤Î¼°¤Îɽ¼¨
pos 100,180
mes" X+ Y= "
pos 75,180;¡Á49 ¾å¤Î¼°¤Îa¤Î¼èÆÀ
objsize 30,15
d=""
input d
pos 135,180;¡Á53 ¾å¤Î¼°¤Îb¤Î¼èÆÀ
objsize 30,15
e=""
input e
pos 190,180;¡Á57 ¾å¤Î¼°¤Îc¤Î¼èÆÀ
objsize 30,15
f=""
input f
pos 230,225;¡Á60¡¡OK¥Ü¥¿¥ó¤Îɽ¼¨
objsize 80,30
button"OK",*main
stop
*main
l = a
h = b
m = c
if a¡ãd : goto *ax :else:goto *vs;¾å¤Î¼°¤È²¼¤Î¼°¤ÎÂ礤µ¤ò¹ç¤ï¤»¤ë¤È¤¤ËÂ礤µ¤òÊѤ¨¤ë¼°¤ÎȽÃÇ
*ax;¡Á73 ²¼¤Î¼°¤¬Â礤«¤Ã¤¿¤È¤¤Î·×»»
g =d¡¿a
a*=g
b*=g
c*=g
goto *cv
*vs;¡Á79 ¾å¤Î¼°¤¬Â礤«¤Ã¤¿¤È¤¤Î·×»»
g =a¡¿d
d =g*d
e =g*e;
f =g*f;
goto *cv
*cv
j =b¡Ýe;¡Á84 ¾å¤Î¼°¤«¤é²¼¤Î¼°¤ò°ú¤¯·×»»
k =c¡Ýf
y = k/j;y¤òµá¤á¤ë·×»»
x = (-h*y+m)/l;x¤òµá¤á¤ë·×»»
mes"X="+x;x¤Îɽ¼¨
mes"Y="+y;y¤Îɽ¼¨
| |
|
2014/10/6(Mon) 18:04:11|NO.65458
¤ó¡Á...¡£
¤Ê¤ó¤«¿§¡¹¤ª¤«¤·¤¤¤Ç¤¹¤¬¡¢±þµÞ½èÃÖ¤ò¤¹¤ë¤È¤¶¤Ã¤È¤³¤ó¤Ê´¶¤¸¤Ç¤·¤ç¤¦¤«¡©
¥¢¥ë¥´¥ê¥º¥à¤Î¥Á¥§¥Ã¥¯¤Þ¤Ç¤Ï¤·¤Æ¤¤¤Þ¤»¤ó¤¬¡¢
A = matrix([1,2],[4,5])
Ax = matrix([3],[6])
(¢¨MaximaÉ÷¤Îµ½Ò¤Ç¤¹¤ß¤Þ¤»¤ó¡£É½¸½¤·¤ä¤¹¤¤¤Î¤Ç¡£)
¤Ç¤Á¤ã¤ó¤ÈÀµ¤·¤¤²ò¤ò½Ð¤·¤Æ¤¯¤ì¤ë¤³¤È¤À¤±¤Ï°ì±þ³Îǧ¤·¤Þ¤·¤¿¡£
x1=0:y1=0 ; ²èÌ̺¸¾å¤ÎºÂɸ
x2=320:y2=480 ; ²èÌ̱¦²¼¤ÎºÂɸ
screen 0,x2,y2 ;¥¦¥£¥ó¥É¥¦É½¼¨
cls 4;²èÌ̤ò¹õ¤ÇÅɤë
a = 0.0
b = 0.0
c = 0.0
d = 0.0
e = 0.0
f = 0.0
g = 0.0
h = 0.0
i = 0.0
j = 0.0
k = 0.0
l = 0.0
m = 0.0
x = 0.0
y = 0.0
z = 0.0
p = 0.0
q = 0.0
n = 0.0
color 255,0,0 :font "MS ¥´¥·¥Ã¥¯",80,1;¡Á27¡¡²¼¤Î³ç¸Ì¤Îɽ¼¨
pos 180,330
mes"{"
color 255,0,0 :font "MS ¥´¥·¥Ã¥¯",15,1;¡Á30¡¡¾å¤Î¼°¤Îɽ¼¨
pos 100,130
mes" X+ Y= "
pos 75,130;¡Á34¡¡¾å¤Î¼°¤Îa¤Î¼èÆÀ
objsize 30,15
input a
pos 135,130;¡Á38¡¡¾å¤Î¼°¤Îb¤Î¼èÆÀ
objsize 30,15
input b
pos 190,130;¡Á42 ¾å¤Î¼°¤Îc¤Î¼èÆÀ
objsize 30,15
input c
color 255,0,0 :font "MS ¥´¥·¥Ã¥¯",15,1;¡Á45 ²¼¤Î¼°¤Îɽ¼¨
pos 100,180
mes" X+ Y= "
pos 75,180;¡Á49 ¾å¤Î¼°¤Îa¤Î¼èÆÀ
objsize 30,15
input d
pos 135,180;¡Á53 ¾å¤Î¼°¤Îb¤Î¼èÆÀ
objsize 30,15
input e
pos 190,180;¡Á57 ¾å¤Î¼°¤Îc¤Î¼èÆÀ
objsize 30,15
input f
pos 230,225;¡Á60¡¡OK¥Ü¥¿¥ó¤Îɽ¼¨
objsize 80,30
button"OK",*main
stop
*main
l = a
h = b
m = c
if a<d : goto *ax :else:goto *vs;¾å¤Î¼°¤È²¼¤Î¼°¤ÎÂ礤µ¤ò¹ç¤ï¤»¤ë¤È¤¤ËÂ礤µ¤òÊѤ¨¤ë¼°¤ÎȽÃÇ
*ax;¡Á73 ²¼¤Î¼°¤¬Â礤«¤Ã¤¿¤È¤¤Î·×»»
g =d/a
a*=g
b*=g
c*=g
goto *cv
*vs;¡Á79 ¾å¤Î¼°¤¬Â礤«¤Ã¤¿¤È¤¤Î·×»»
g =a/d
d =g*d
e =g*e;
f =g*f;
goto *cv
*cv
j =b-e;¡Á84 ¾å¤Î¼°¤«¤é²¼¤Î¼°¤ò°ú¤¯·×»»
k =c-f
y = k/j;y¤òµá¤á¤ë·×»»
x = (-h*y+m)/l;x¤òµá¤á¤ë·×»»
mes"X="+x;x¤Îɽ¼¨
mes"Y="+y;y¤Îɽ¼¨
2¸µÏ¢Î©°ì¼¡ÊýÄø¼°¤Ç¤¹¤«...¡£
¤Á¤ç¤¤¤È¹ÔÎó¤ÎÏäˤʤê¤Þ¤¹¤¬¡¢
A = matrix([a11,a12],[a21,a22])
x = matrix([x1],[x2])
Ax = matrix([0],[0])
¤È¸À¤¦É÷¤Ë¹ÔÎó¤Î¥¢¥¤¥Ç¥¢¤ò»È¤¨¤Ð¡¢a¤È¤«b¤È¤«¤Þ¤É¤í¤Ã¤³¤·¤¤ÊÑ¿ô¤ò»È¤ï¤Ê¤¯¤Æ¤â
ÇÛÎó¤Ç³Ú¤Ë°·¤¨¤Þ¤¹¡£
n¸µÏ¢Î©1¼¡ÊýÄø¼°¤Þ¤Ç²ò¤¤¤Æ¤¯¤ì¤ë¤è¤¦¤Ê¤Î¤ò¤Ä¤¯¤ë¤ÈÌÌÇò¤¤¤Ç¤¹¤Í¡£
²ò¤Î¸ºß¤Î¥Á¥§¥Ã¥¯¤ò¤·¤Æ¤¯¤ì¤¿¤ê¡¢²ò¶õ´Ö¤Þ¤Çµá¤á¤Æ¤¯¤ì¤ë¤È¼ûÍפ¢¤ë¤«¤â¡©
| |
|
2014/10/6(Mon) 18:07:20|NO.65459
Ä󼨤µ¤ì¤¿¥¹¥¯¥ê¥×¥È¤Ç¤¦¤Þ¤¯Æ°¤«¤Ê¤¤Íýͳ¤Î¥Ò¥ó¥È¤ò¤¤¤¯¤Ä¤«µó¤²¤Þ¤¹¡£
¡ ·×»»ÍѤÎÊÑ¿ô (a,b,...)¤¬Ê¸»úÎ󷿤ǽé´ü²½¤µ¤ì¤Æ¤¤¤¿¡£
¢ /¤È¤¹¤Ù¤¤ò¡¿¤È½ñ¤¤¤Æ¤¤¤ë²Õ½ê¤¬¤¢¤ë¡£
£ -¤È¤¹¤Ù¤¤ò¡Ý¤È¤·¤Æ¤¤¤ë²Õ½ê¤¬¤¢¤ë¡£
¡¤òľ¤¹¤¿¤á¤Ë¡¢¼Â¿ô·¿¤ËÃÖ¤´¹¤¨¤Æ¤ª¤¤Þ¤·¤¿¡£
|
|
2014/10/6(Mon) 19:02:57|NO.65461
#define ctype f(%1) strf("%%g",%1)
//0.02500Ž¥Ž¥Ž¥¤ò0.025¤Ë¤¹¤ë
x1=3.0
x2=2.0
y1=4.0
y2=1.0
a1=5.0
a2=0.0
x5=x1:y5=y1:a5=a1
cls 4
color 255,0,0
font "",50
pos 20,50
mes "{"
color 255,0,0
font "",25
pos 50,50
mes ""+f(x1)+"x+"+f(y1)+"y="+f(a1)
mes ""+f(x2)+"x+"+f(y2)+"y="+f(a2)
p1=x1*x2
p2=p1/x1
p3=p1/x2
x1=p2*x1
y1=p2*y1
a1=p2*a1
x2=p3*x2
y2=p3*y2
a2=p3*a2
//¾å¡¢²¼¤Î¼°¤ÎxƱ»Î¤ÎºÇ¾®¸øÇÜ¿ô¤ò³Ý¤±¤ë
color 255,0,0
font "",50
pos 20,120
mes "{"
font "",25
pos 50,120
mes ""+f(x1)+"x+"+f(y1)+"y="+f(a1)
mes ""+f(x2)+"x+"+f(y2)+"y="+f(a2)
x3=x1-x2
y3=y1-y2
a3=a1-a2
//¾å¤Î¼°¤«¤é²¼¤Î¼°¤ò°ú¤¯
boxf 20,170,200,171
mes " "+f(y3)+"y="+f(a3)
y=a3/y3
//Ìóʬ
mes " y="+f(y)
//y¤â¤È¤á¤é¤ì¤¿
ky=y*y5
//x¤òµá¤á¤ë¤¿¤á¤Ë¡¢y¤òÂåÆþ
pos 50,250
mes ""+f(x5)+"x+"+f(ky)+"="+f(a5)
a5=a5+ky*-1
//°Ü¹à
ky=""
mes ""+f(x5)+"x="+f(a5)
x=a5/x5
//Ìóʬ
mes "x="+f(x)
//x¤â¤È¤á¤é¤ì¤¿
pos 50,350
mes "x="+f(x)+" y="+f(y)
boxf 20,375,200,376
|
|
2014/10/7(Tue) 00:16:33|NO.65467
°ì¼¡¤ÎÊýÄø¼°¤ò²ò¤¯¤Ê¤éÀþ·ÁÂå¿ô¤¬ºÇ¤â´Êñ¤À¤È»×¤¤¤Þ¤¹¡£
ax + by = p
cx + dy = q
¤Ë¤Ä¤¤¤Æ¡¡A = [a b ; c d] , B = [p ; q]¡¡¤¹¤ë¤È
AX = B ¤¬À®¤êΩ¤Ä¤Î¤Ç X = (A^-1)B ¤È¤Ê¤ê¤Þ¤¹¡£
(A^-1) = (1 / detA) * t[A¤Î;°ø»Ò¹ÔÎó]
¤Ç¤¹¤¬¡¢t[A¤Î;°ø»Ò¹ÔÎó]¤Ï(2,2)·¿¤ÎÀµÊý¹ÔÎó¤Î¸ø¼°¤«¤é[d -b ; -c a]¤È¤Ê¤ë¤Î¤Ç¡¢
[d -b ; -c a] * [p ; q]¤ò·×»»¤¹¤ë¤È²ò[x ; y]¤¬¤Ç¤Þ¤¹¡£
£³¸µ¤ä£´¸µ¤ÎÊýÄø¼°¤ò²ò¤¤¿¤¤¾ì¹ç¤Ï¤Þ¤¸¤á¤Ë;°ø»Ò¹ÔÎó¤ÈžÃÖ¹ÔÎó¤ò·×»»¤·¤Æ
µÕ¹ÔÎó¤òµá¤á¤¿¸å¡¢¶ñÂÎŪ¤ÊÊýË¡¤ÏÃΤê¤Þ¤»¤ó¤¬¹ÔÎó¤ò¹â®¤Ë·×»»¤¹¤ë¥¢¥ë¥´¥ê¥º¥à¤Ç
ÀѤò·×»»¤·¤Æ¤ä¤ì¤ÐƱ¤¸¤è¤¦¤Ë²ò¤¬¤Ç¤ë¤Ï¤º¤Ç¤¹¡£
/*
AX = P ¤ò X = (A^-1)P ¤ËÊÑ·Á¤·¤Æ¹Í¤¨¤Þ¤¹¡£
¤³¤Î¥³¡¼¥É¤Ç¤ÏÆ󸵣±¼¡ÊýÄø¼°¤Î¤ß²ò¤±¤Þ¤¹¡£
A^-1 = (1 / detA) * t[A¤Î;°ø»Ò¹ÔÎó]
¤ò»È¤¨¤Ð²¿¸µ¤Ç¤â²ò¤±¤ë¤Ï¤º¤Ç¤¹¡£
*/
// ÊÑ¿ô½é´ü²½
x1 = 3 : y1 = 2 : a1 = 1
x2 = 7 : y2 = 5 : a2 = -1
ix1 = 0 : iy1 = 0
ix2 = 0 : iy2 = 0
Ax = 0 : Ay = 0
objsize 24, 20
// ¼°1
pos 16, 8 : input x1 : pos 48, 12 : mes "X +"
pos 80, 8 : input y1 : pos 112, 12 : mes "Y ="
pos 144, 8: input a1
// ¼°2
pos 16, 32 : input x2 : pos 48, 36 : mes "X +"
pos 80, 32 : input y2 : pos 112, 36 : mes "Y ="
pos 144, 32: input a2
objsize 80, 24 : button "·×»»", *label
stop
*label
color 255, 255, 255 : boxf 0, 64, 640, 480 : color
// ·¸¿ô¹ÔÎó¤Ë¤Ä¤¤¤Ædet(¹ÔÎó¼°¤ÎÃÍ)¤òµá¤á¤ë
detA = double( x1 * y2 - x2 * y1 )
pos 8, 96 : mes "detA = " +detA + "\n"
if detA == 0.0 : dialog "²ò̵¤·¡¢¤â¤·¤¯¤ÏÁ´¤Æ" : stop
// ·¸¿ô¹ÔÎó¤ÎµÕ¹ÔÎó¤Î³ÆÍ×ÁǤòµá¤á¤ë
idetA = 1.0 / double(detA)
ix1 = double(y2) * idetA
iy1 = double(-y1) * idetA
ix2 = double(-x2) * idetA
iy2 = double(x1) * idetA
// µÕ¹ÔÎó¤òɽ¼¨
mes "·¸¿ô¹ÔÎó¤ÎµÕ¹ÔÎó = [" + ix1 + " " + iy1 + " ; " + ix2 + " " + iy2 + " ]\n"
// ·¸¿ô¹ÔÎó¤ÎµÕ¹ÔÎó¤È[ a1 a2 ]¤ÎÀѤòµá¤á¤ë ( [2,1]·¿ )
Ax = double(ix1) * double(a1) + double(iy1) * double(a2)
Ay = double(ix2) * double(a1) + double(iy2) * double(a2)
// ɽ¼¨
mes "X = " + Ax
mes "Y = " + Ay
stop
| |
|
2014/10/7(Tue) 19:04:03|NO.65470
¡¡³§¤µ¤óËÜÅö¤Ë¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£
ËͤϤޤÀ³ØÀ¸¤Ç¤¹¤¬¡¢¤¿¤¯¤µ¤óÎý½¬¤·¤Æ¤â¤Ã¤È¤¹¤´¤¤¥×¥í¥°¥é¥à¤ò½ñ¤±¤ë¤è¤¦¤Ë¤Ê¤ê¤¿¤¤¤Ç¤¹¡£
¡¡¤¿¤¯¤µ¤ó¤Î¥¢¥É¥Ð¥¤¥¹¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤·¤¿¡£
|
|