2013-10-31 71 views

回答

0

嘗試使用函數「subs」。這聽起來是這樣的:

for i = Xstart:Xend 
    y(i) = subs(f,x,i); 
end 

plot(Xstart:Xend,y) 

我希望我能幫上忙。

2

要繪製,你可以做

xx = 0:.1:10; 
fxx = matlabFunction(fx); 
plot(xx, fxx(xx)) 

fxx = matlabFunction(fx); 
fplot(fxx, [0 10]) 

而對於積分,一種解決方案是:

fxx = matlabFunction(fx); 
ifxx = @(x) integral(fxx,0,x); 
fplot(ifxx, [0 10]) 

這是爲了讓你去。 我希望會有更好的答案。

+0

非常感謝幫助我 – user2942448

+0

@horchler是的。我改變了它。 – Simon