| ²é¿´: 537 | »Ø¸´: 2 | ||
ÈûÄɺӵÄ×ó°¶½ð³æ (ÖøÃûдÊÖ)
|
[ÇóÖú]
matlab³ÌÐòÓÐÎó£¬Íû²»Áߴͽ̣¬Ê®·Ö¸Ðл£¬matlabÕæµÄÊÇÁã»ù´¡
|
|
ÓÃÈý´ÎÑùÌõº¯Êý ȥģÄâÆû³µÃŵÄÇúÏߣ¬³µÃÅÇúÏßµÄÐÍÖµµãÊý¾ÝÈçÏ 0 1 2 3 4 5 6 7 8 9 10 2.51 3.30 4.04 4.70 5.22 5.54 5.78 5.40 5.57 5.70 5.80 >> x=0:1:10; y=[2.51 3.30 4.04 4.70 5.22 5.54 5.78 5.40 5.57 5.70 5.80]; dy0=0.8; dy10=0.2; xx=0:.01:10; hh=h(x); uu=u(hh); dd=d(hh,y); d0=6.0/hh(1)*((y(2)-y(1))/hh(1)-dy0); d10=6.0/hh(10)*(dy10-(y(11)-y(10))/hh(10)); a=[uu 1]; b=[2 2 2 2 2 2 2 2 2 2 2]; c=[1 1-uu]; d=[d0 dd d10]; f1=m(a,b,c,d,x); for i=1:1001 yy(i)=s(x,y,hh,f1,xx(i)); end plot(x,y,'bo-',xx,yy,'r') ??? Undefined function or method 'h' for input arguments of type 'double'. >> function hh=h(x) n=length(x)-1; for i=1:n hh(i)=x(i+1)-x(i); end ??? function hh=h(x) | Error: Function definitions are not permitted in this context. >> function uu=u(x) n=length(x)-1; for i=1:n uu(i)=x(i)/(x(i)+x(i+1)); end ??? function uu=u(x) | Error: Function definitions are not permitted in this context. >> function dd=d(hh,y) n=length(hh)-1; for i=1:n dd(i)=6.0/(hh(i)+hh(i+1))*((y(i+2)-y(i+1))/hh(i+1)-(y(i+1)-y(i))/hh(i)); end ??? function dd=d(hh,y) | Error: Function definitions are not permitted in this context. >> function f=m(a,b,c,d,x) n=length(x)-1; for i=2:n r=a(i-1)/b(i-1); b(i)=b(i)-r*c(i-1); d(i)=d(i)-r*d(i-1); end d(n+1)=d(n+1)/b(n+1); for i=n:-1:1 d(i)=(d(i)-c(i)*d(i+1)/b(i+1))/b(i); end f=d; ??? function f=m(a,b,c,d,x) | Error: Function definitions are not permitted in this context. >> function an=s(x,y,h,f,x0) n=length(x)-1; for i=1:n if x0>=x(i)&x0<=x(i+1) an=f(i)*(x(i+1)-x0)^3/(6*h(i))+f(i+1)*(x0-x(i))^3/(6*h(i))+(y(i)-f(i)*h(i)^2/6)*(x(i+1)-x0)/h(i)+(y(i+1)-f(i+1)*h(i)^2/6)*(x0-x(i))/h(i); end end ??? function an=s(x,y,h,f,x0) | Error: Function definitions are not permitted in this context. Õâ¸öÎÒÕæµÄ²»»á£¬ÇóÖ¸½Ì°¡ |
» ²ÂÄãϲ»¶
Ò»Ö¾Ô¸±±¾©¿Æ¼¼´óѧ²ÄÁϹ¤³Ì085601£¬Çóµ÷¼Á
ÒѾÓÐ15È˻ظ´
288Çóµ÷¼Á Ò»Ö¾Ô¸¹þ¹¤´ó ²ÄÁÏÓ뻯¹¤
ÒѾÓÐ8È˻ظ´
Ò»Ö¾Ô¸Ö£ÖÝ´óѧ²ÄÁÏÓ뻯¹¤085600£¬Çóµ÷¼Á
ÒѾÓÐ17È˻ظ´
»¯¹¤Çóµ÷¼Á
ÒѾÓÐ10È˻ظ´
311Çóµ÷¼Á
ÒѾÓÐ11È˻ظ´
357Çóµ÷¼Á
ÒѾÓÐ11È˻ظ´
²ÄÁϵ÷¼Á
ÒѾÓÐ8È˻ظ´
319Çóµ÷¼Á
ÒѾÓÐ3È˻ظ´
292Çóµ÷¼Á
ÒѾÓÐ22È˻ظ´
²ÄÁϵ÷¼Á
ÒѾÓÐ8È˻ظ´
» ±¾Ö÷ÌâÏà¹Ø¼ÛÖµÌùÍÆ¼ö£¬¶ÔÄúͬÑùÓаïÖú:
matlabÓÅ»¯Çó½âÖÐÓöµ½ÎÊÌ⣬Íû´óÉñÖ¸µã¡£¡£¡£
ÒѾÓÐ7È˻ظ´
matlab½á¹ûÖУ¬Ì«Ð¡µÄÊý²»ÓÿÆÑ§¼ÆÊý·¨£¬ÈÃÆäÏÔʾΪÁ㣨ËÄÉáÎåÈ룩£¬Ôõô°ì£¿
ÒѾÓÐ10È˻ظ´
ÓÃMatlabÉú³ÉÒ»ÕÅÀàËÆÄ§·½µÄͼƬ£¬Íû¸÷·´óÉñÖ¸½Ì£¡£¡£¡£¡£¡£¡£¡£¡
ÒѾÓÐ3È˻ظ´
¸ßÊÖ½øÀ´ÓÃmatlabÇó½â³£Î¢·Ö·½³Ì£¬Ê®·Ö¸Ðл£¡
ÒѾÓÐ17È˻ظ´

ʱÓ곿ÐÇ
Ìú³æ (³õÈëÎÄ̳)
- Ó¦Öú: 2 (Ó×¶ùÔ°)
- ½ð±Ò: 103.8
- ºì»¨: 1
- Ìû×Ó: 44
- ÔÚÏß: 12.6Сʱ
- ³æºÅ: 3441176
- ×¢²á: 2014-09-25
- ÐÔ±ð: GG
- רҵ: µçÁ¦ÏµÍ³

2Â¥2014-11-24 12:40:08
ÈûÄɺӵÄ×ó°¶
½ð³æ (ÖøÃûдÊÖ)
- Ó¦Öú: 4 (Ó×¶ùÔ°)
- ½ð±Ò: 2426.1
- É¢½ð: 10
- ºì»¨: 3
- Ìû×Ó: 1179
- ÔÚÏß: 234.6Сʱ
- ³æºÅ: 1388927
- ×¢²á: 2011-09-03
- ÐÔ±ð: GG
- רҵ: µç»¯Ñ§

3Â¥2014-11-24 14:23:25














»Ø¸´´ËÂ¥