Integral vector .* sin(pi*x) error matrix dimensions must agree.
显示 更早的评论
I have the following code I try to find integral for function f the um is data vector (1X50). The problem is how can I used ingtral function to find integral for (vector .* sin(pi*x)), when I run code I received error "matrix dimensions must agree." any badoy can help me.
if true
L=1;
x = linspace(0, L, n);
fm=zeros(1,n);
for i=1:1
lam=i*pi;
f=@(x) um .* sin(lam * x ); % _um vector 1X50 double_
fm=fm+exp(lam^2*T)*sin(lam*x)*(2*integral(f,0,L));
end
end
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Univariate Discrete Distributions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!