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!