刚接触matlab 麻烦帮忙看下哪里出错了,算出来的结果还带着一个x,程序如下syms xa=300000*0.006b=x-300000*0.006c=0d=0i=0for i=1:239a=(300000-b)*0.006b=x-ac=c+ad=d+bi=i+1end;f=subs(solve('240*x-300000-c',x))
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/15 21:47:42
刚接触matlab 麻烦帮忙看下哪里出错了,算出来的结果还带着一个x,程序如下syms xa=300000*0.006b=x-300000*0.006c=0d=0i=0for i=1:239a=(300000-b)*0.006b=x-ac=c+ad=d+bi=i+1end;f=subs(solve('240*x-300000-c',x))
刚接触matlab 麻烦帮忙看下哪里出错了,算出来的结果还带着一个x,程序如下
syms x
a=300000*0.006
b=x-300000*0.006
c=0
d=0
i=0
for i=1:239
a=(300000-b)*0.006
b=x-a
c=c+a
d=d+b
i=i+1
end;
f=subs(solve('240*x-300000-c',x))
刚接触matlab 麻烦帮忙看下哪里出错了,算出来的结果还带着一个x,程序如下syms xa=300000*0.006b=x-300000*0.006c=0d=0i=0for i=1:239a=(300000-b)*0.006b=x-ac=c+ad=d+bi=i+1end;f=subs(solve('240*x-300000-c',x))
函数又没给x赋值啊 你再仔细看看函数
肯定有乘以x啊
ps: 你可以在语句后面 加 ; 分号 这样 就可以把中间过程不想显示的语句都屏蔽了
我感觉一般题目不会出这么蛋疼吧 - -应该是中间写错了 检查下吧 看到那答案我都蛋疼了
f =
1382494142074797189574342268808786968609517897574114060691291895563648528005677586324126353153519039558933193060742192469229687107373827885929676167058332861346963821498296241230076636883676303292592577598387103303928196948289333587035290212097534907634944475707362889611309709362816739471031419907776639717581140768150148375160419255978527098202899489492285706188843321498406940637790525851284771000246954564408584302596261674675821528770206753600071252464485099733208101729086794408300912112514118918743851438611548567056261107894854033776353145682898137588658808094523913024713097369909261181475465047820075508346443440624363089106986812614189801/452783953941335618375455964544389589034126559906956909479130744496775065929642255736976572598047904972697621964843891482794136643663662766812194604426622390747070312500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000-544329134253730074113055186942404885909759895244184844559622825801154434971224804930570113773143186611186470300516959203169596558570435322619342565592693055444710635227360136675181875964033699176953066487455922658688549809925954115032245788614989737216052856373654401256634373646304385670157767530737746397904529794460930573379917330947455355877721054698411798760369055378548959754502872364974555582994951600953811399584630519535725418911861511119028051609455525912011303231866045366768012501568768749316826512394285228473456432761559308483682853655348620962089788280434780523677485545473464608385005313341723149604826736040343234109645846021089/90556790788267123675091192908877917806825311981391381895826148899355013185928451147395314519609580994539524392968778296558827328732732553362438920885324478149414062500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000*x