Matlab定义一个带有定积分的函数,然后作图。
Show older comments
定义函数
fun3
function [f] = fun3(v,a,ri,ro)
f=v.^3.*integral(@(r)(exp(v.*(r.^a))-1).^(-1).*r,ri,ro);
end这个定义函数直接带入变量可出来结果,但是我用plot做图就出错了,代码如下:
v=0:0.01:500;
plot(v,fun3(v,1,1,100));
错误显示为Matrix dimensions must agree.
请问究竟是什么哪里出了问题?不知道哪位能帮我看看,谢谢了。
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!