Matlab定义一个带有定积分的函数,然后作图。
显示 更早的评论
定义函数
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.
请问究竟是什么哪里出了问题?不知道哪位能帮我看看,谢谢了。
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!